diff options
author | Jan Blunck <jblunck@suse.de> | 2008-02-14 22:34:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-15 00:13:33 -0500 |
commit | 4ac9137858e08a19f29feac4e1f4df7c268b0ba5 (patch) | |
tree | f5b5d84fd12fcc2b0ba0e7ce1a79ff381ad8f5dd /arch/sparc64 | |
parent | c5e725f33b733a77de622e91b6ba5645fcf070be (diff) |
Embed a struct path into struct nameidata instead of nd->{dentry,mnt}
This is the central patch of a cleanup series. In most cases there is no good
reason why someone would want to use a dentry for itself. This series reflects
that fact and embeds a struct path into nameidata.
Together with the other patches of this series
- it enforced the correct order of getting/releasing the reference count on
<dentry,vfsmount> pairs
- it prepares the VFS for stacking support since it is essential to have a
struct path in every place where the stack can be traversed
- it reduces the overall code size:
without patch series:
text data bss dec hex filename
5321639 858418 715768 6895825 6938d1 vmlinux
with patch series:
text data bss dec hex filename
5320026 858418 715768 6894212 693284 vmlinux
This patch:
Switch from nd->{dentry,mnt} to nd->path.{dentry,mnt} everywhere.
[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix cifs]
[akpm@linux-foundation.org: fix smack]
Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/solaris/fs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sparc64/solaris/fs.c b/arch/sparc64/solaris/fs.c index 9311bfe4f2f7..516932e9f70b 100644 --- a/arch/sparc64/solaris/fs.c +++ b/arch/sparc64/solaris/fs.c | |||
@@ -434,8 +434,8 @@ asmlinkage int solaris_statvfs(u32 path, u32 buf) | |||
434 | 434 | ||
435 | error = user_path_walk(A(path),&nd); | 435 | error = user_path_walk(A(path),&nd); |
436 | if (!error) { | 436 | if (!error) { |
437 | struct inode * inode = nd.dentry->d_inode; | 437 | struct inode *inode = nd.path.dentry->d_inode; |
438 | error = report_statvfs(nd.mnt, inode, buf); | 438 | error = report_statvfs(nd.path.mnt, inode, buf); |
439 | path_release(&nd); | 439 | path_release(&nd); |
440 | } | 440 | } |
441 | return error; | 441 | return error; |
@@ -464,8 +464,8 @@ asmlinkage int solaris_statvfs64(u32 path, u32 buf) | |||
464 | lock_kernel(); | 464 | lock_kernel(); |
465 | error = user_path_walk(A(path), &nd); | 465 | error = user_path_walk(A(path), &nd); |
466 | if (!error) { | 466 | if (!error) { |
467 | struct inode * inode = nd.dentry->d_inode; | 467 | struct inode *inode = nd.path.dentry->d_inode; |
468 | error = report_statvfs64(nd.mnt, inode, buf); | 468 | error = report_statvfs64(nd.path.mnt, inode, buf); |
469 | path_release(&nd); | 469 | path_release(&nd); |
470 | } | 470 | } |
471 | unlock_kernel(); | 471 | unlock_kernel(); |