Josef 'Jeff' Sipek
16f1820028
fs: introduce vfs_path_lookup
...
Stackable file systems, among others, frequently need to lookup paths or
path components starting from an arbitrary point in the namespace
(identified by a dentry and a vfsmount). Currently, such file systems use
lookup_one_len, which is frowned upon [1] as it does not pass the lookup
intent along; not passing a lookup intent, for example, can trigger BUG_ON's
when stacking on top of NFSv4.
The first patch introduces a new lookup function to allow lookup starting
from an arbitrary point in the namespace. This approach has been suggested
by Christoph Hellwig [2].
The second patch changes sunrpc to use vfs_path_lookup.
The third patch changes nfsctl.c to use vfs_path_lookup.
The fourth patch marks link_path_walk static.
The fifth, and last patch, unexports path_walk because it is no longer
unnecessary to call it directly, and using the new vfs_path_lookup is
cleaner.
For example, the following snippet of code, looks up "some/path/component"
in a directory pointed to by parent_{dentry,vfsmnt}:
err = vfs_path_lookup(parent_dentry, parent_vfsmnt,
"some/path/component", 0, &nd);
if (!err) {
/* exits */
...
/* once done, release the references */
path_release(&nd);
} else if (err == -ENOENT) {
/* doesn't exist */
} else {
/* other error */
}
VFS functions such as lookup_create can be used on the nameidata structure
to pass the create intent to the file system.
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu >
Cc: Al Viro <viro@zeniv.linux.org.uk >
Acked-by: Christoph Hellwig <hch@lst.de >
Cc: Trond Myklebust <trond.myklebust@fys.uio.no >
Cc: Neil Brown <neilb@suse.de >
Cc: Michael Halcrow <mhalcrow@us.ibm.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2007-07-19 10:04:45 -07:00
..
2007-07-17 10:23:07 -07:00
2007-07-12 15:41:24 -07:00
2007-07-14 20:47:26 -07:00
2007-07-18 02:21:50 -07:00
2007-07-10 22:16:55 -07:00
2007-07-17 10:23:08 -07:00
2007-07-17 10:23:15 -07:00
2007-07-17 10:23:09 -07:00
2007-07-17 10:23:05 -07:00
2007-07-17 10:23:08 -07:00
2007-07-12 16:29:50 -07:00
2007-07-19 10:04:43 -07:00
2007-07-11 16:02:08 -07:00
2007-07-19 10:04:43 -07:00
2007-07-13 08:06:14 -07:00
2007-07-10 21:46:03 -04:00
2007-07-16 09:05:42 -07:00
2007-07-16 09:05:47 -07:00
2007-07-16 09:05:52 -07:00
2007-07-19 10:04:45 -07:00
2007-07-17 10:23:02 -07:00
2007-07-17 14:18:47 +02:00
2007-07-16 09:05:51 -07:00
2007-07-16 09:05:42 -07:00
2007-07-16 09:05:48 -07:00
2007-07-10 17:18:59 -07:00
2007-06-08 17:23:34 -07:00
2007-07-16 09:05:42 -07:00
2007-07-16 09:05:46 -07:00
2007-07-16 09:05:48 -07:00
2007-07-17 10:23:04 -07:00
2007-07-11 20:58:54 +08:00
2007-07-11 16:09:00 -07:00
2007-07-18 15:49:50 -07:00
2007-07-09 08:22:54 +01:00
2007-07-09 08:22:33 +01:00
2007-07-09 08:23:17 +01:00
2007-07-16 09:05:45 -07:00
2007-07-13 08:06:13 -07:00
2007-07-11 16:09:00 -07:00
2007-07-16 09:05:42 -07:00
2007-07-12 10:55:56 -07:00
2007-07-08 22:16:36 -04:00
2007-07-17 10:23:06 -07:00
2007-07-18 08:47:40 -07:00
2007-07-10 22:16:21 -07:00
2007-07-14 19:07:52 -07:00
2007-06-28 11:34:53 -07:00
2007-07-17 10:23:06 -07:00
2007-07-16 09:05:52 -07:00
2007-07-16 09:05:52 -07:00
2007-07-18 09:02:56 -04:00
2007-07-18 09:15:20 -04:00
2007-07-18 09:15:20 -04:00
2007-07-18 09:19:57 -04:00
2007-07-17 21:42:44 -04:00
2007-07-17 10:23:13 -07:00
2007-07-16 09:05:45 -07:00
2007-07-10 00:07:45 +02:00
2007-07-19 10:04:42 -07:00
2007-07-19 10:04:44 -07:00
2007-07-18 18:29:37 -04:00
2007-07-16 09:05:41 -07:00
2007-06-18 09:48:41 -07:00
2007-07-16 08:52:46 +02:00
2007-07-17 10:22:59 -07:00
2007-07-09 08:23:12 +01:00
2007-07-10 00:35:17 -04:00
2007-07-09 18:51:58 +02:00
2007-07-09 14:23:37 +02:00
2007-07-19 10:04:41 -07:00
2007-07-16 09:05:45 -07:00
2007-07-17 10:22:59 -07:00
2007-07-12 14:12:29 +02:00
2007-07-16 09:05:41 -07:00
2007-07-09 23:17:58 +02:00
2007-07-16 09:05:34 -07:00
2007-07-12 16:07:26 -04:00
2007-07-10 22:15:03 -07:00
2007-07-14 18:55:06 -07:00
2007-07-10 22:15:58 -07:00
2007-07-10 22:15:58 -07:00
2007-07-10 22:15:58 -07:00
2007-07-10 22:16:42 -07:00
2007-07-14 18:53:28 -07:00
2007-06-22 17:04:27 -07:00
2007-07-16 09:05:47 -07:00
2007-07-16 09:05:48 -07:00
2007-07-10 00:35:17 -04:00
2007-07-16 09:05:50 -07:00
2007-07-10 13:43:25 +02:00
2007-07-16 09:05:47 -07:00
2007-07-10 22:56:31 -07:00
2007-07-10 22:16:44 -07:00
2007-07-16 09:05:46 -07:00
2007-07-18 08:57:06 -04:00
2007-07-17 10:23:03 -07:00
2007-07-16 09:05:46 -07:00
2007-07-17 10:23:02 -07:00
2007-07-17 10:23:05 -07:00
2007-07-18 08:47:40 -07:00
2007-07-18 15:49:49 -07:00
2007-07-19 10:04:44 -07:00
2007-07-10 22:15:26 -07:00
2007-07-16 09:05:42 -07:00
2007-07-10 21:30:33 -04:00
2007-07-17 10:23:03 -07:00
2007-07-17 10:23:13 -07:00
2007-07-16 09:05:34 -07:00
2007-07-16 12:05:49 +03:00
2007-07-18 08:47:45 -07:00
2007-07-17 10:22:59 -07:00
2007-07-19 10:04:45 -07:00
2007-07-17 10:22:59 -07:00
2007-07-16 09:05:48 -07:00
2007-07-16 09:05:42 -07:00
2007-07-16 09:05:42 -07:00
2007-07-10 17:33:05 +01:00
2007-07-19 10:04:45 -07:00
2007-07-16 09:05:51 -07:00
2007-07-18 02:10:54 -07:00
2007-07-10 22:18:21 -07:00
2007-07-10 23:40:48 -04:00
2007-07-10 23:40:25 -04:00
2007-07-10 23:40:39 -04:00
2007-07-10 23:40:46 -04:00
2007-07-10 23:40:48 -04:00
2007-07-10 23:40:26 -04:00
2007-07-10 23:40:39 -04:00
2007-07-19 10:04:42 -07:00
2007-07-16 09:05:48 -07:00
2007-07-19 10:04:44 -07:00
2007-07-09 12:17:34 -04:00
2007-07-13 10:52:27 -07:00
2007-07-16 09:05:40 -07:00
2007-07-10 11:25:59 +01:00
2007-07-16 09:05:41 -07:00
2007-07-16 09:05:42 -07:00
2007-07-16 09:05:48 -07:00
2007-07-10 08:04:16 +02:00
2007-07-11 19:46:26 -07:00
2007-07-10 22:16:22 -07:00
2007-07-19 10:04:42 -07:00
2007-07-10 11:25:44 +01:00
2007-07-16 09:05:50 -07:00
2007-07-16 09:05:46 -07:00
2007-07-16 09:05:39 -07:00
2007-07-17 10:23:03 -07:00
2007-07-18 08:47:40 -07:00
2007-07-10 22:15:40 -07:00
2007-07-16 09:05:47 -07:00
2007-07-12 10:55:54 -07:00
2007-07-16 09:05:42 -07:00
2007-07-16 09:05:50 -07:00
2007-07-11 22:52:29 -04:00
2007-07-10 17:51:13 -07:00
2007-07-18 08:38:22 -07:00
2007-07-18 08:38:22 -07:00
2007-07-16 09:05:35 -07:00
2007-07-12 14:12:31 +02:00
2007-07-16 09:05:42 -07:00
2007-07-15 16:40:51 -07:00
2007-07-17 10:23:01 -07:00
2007-07-17 10:23:01 -07:00
2007-07-17 17:26:43 -07:00
2007-07-17 10:23:01 -07:00
2007-06-24 08:59:11 -07:00
2007-07-16 09:05:42 -07:00
2007-07-17 14:39:19 -07:00
2007-07-16 09:05:45 -07:00
2007-07-16 09:05:46 -07:00
2007-07-16 09:05:40 -07:00
2007-07-10 08:04:14 +02:00
2007-07-18 08:47:40 -07:00
2007-07-19 10:04:42 -07:00
2007-07-17 10:22:59 -07:00
2007-07-17 21:42:44 -04:00
2007-07-11 16:09:06 -07:00
2007-07-11 16:09:09 -07:00
2007-07-16 09:05:46 -07:00
2007-07-17 10:23:03 -07:00
2007-07-16 09:05:45 -07:00
2007-07-13 10:11:52 -07:00
2007-07-16 09:05:47 -07:00
2007-07-10 22:15:57 -07:00
2007-07-18 15:57:15 -07:00
2007-07-16 09:05:45 -07:00
2007-07-12 16:34:42 -07:00
2007-07-12 16:34:40 -07:00
2007-07-16 09:05:47 -07:00
2007-07-16 09:05:48 -07:00
2007-07-18 08:47:41 -07:00
2007-07-17 10:22:59 -07:00
2007-07-17 10:23:11 -07:00
2007-07-09 18:52:01 +02:00
2007-07-16 09:05:51 -07:00