diff options
author | David Howells <dhowells@redhat.com> | 2006-06-23 05:02:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:42:45 -0400 |
commit | 726c334223180e3c0197cc980a432681370d4baf (patch) | |
tree | 8327b354bb3dc959a6606051ae6f8d4d035e38a2 /fs/ntfs | |
parent | 454e2398be9b9fa30433fccc548db34d19aa9958 (diff) |
[PATCH] VFS: Permit filesystem to perform statfs with a known root dentry
Give the statfs superblock operation a dentry pointer rather than a superblock
pointer.
This complements the get_sb() patch. That reduced the significance of
sb->s_root, allowing NFS to place a fake root there. However, NFS does
require a dentry to use as a target for the statfs operation. This permits
the root in the vfsmount to be used instead.
linux/mount.h has been added where necessary to make allyesconfig build
successfully.
Interest has also been expressed for use with the FUSE and XFS filesystems.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Nathan Scott <nathans@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ntfs')
-rw-r--r-- | fs/ntfs/super.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index d5d5e969294f..0e14acea3f8b 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c | |||
@@ -2601,10 +2601,10 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol, | |||
2601 | 2601 | ||
2602 | /** | 2602 | /** |
2603 | * ntfs_statfs - return information about mounted NTFS volume | 2603 | * ntfs_statfs - return information about mounted NTFS volume |
2604 | * @sb: super block of mounted volume | 2604 | * @dentry: dentry from mounted volume |
2605 | * @sfs: statfs structure in which to return the information | 2605 | * @sfs: statfs structure in which to return the information |
2606 | * | 2606 | * |
2607 | * Return information about the mounted NTFS volume @sb in the statfs structure | 2607 | * Return information about the mounted NTFS volume @dentry in the statfs structure |
2608 | * pointed to by @sfs (this is initialized with zeros before ntfs_statfs is | 2608 | * pointed to by @sfs (this is initialized with zeros before ntfs_statfs is |
2609 | * called). We interpret the values to be correct of the moment in time at | 2609 | * called). We interpret the values to be correct of the moment in time at |
2610 | * which we are called. Most values are variable otherwise and this isn't just | 2610 | * which we are called. Most values are variable otherwise and this isn't just |
@@ -2617,8 +2617,9 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol, | |||
2617 | * | 2617 | * |
2618 | * Return 0 on success or -errno on error. | 2618 | * Return 0 on success or -errno on error. |
2619 | */ | 2619 | */ |
2620 | static int ntfs_statfs(struct super_block *sb, struct kstatfs *sfs) | 2620 | static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs) |
2621 | { | 2621 | { |
2622 | struct super_block *sb = dentry->d_sb; | ||
2622 | s64 size; | 2623 | s64 size; |
2623 | ntfs_volume *vol = NTFS_SB(sb); | 2624 | ntfs_volume *vol = NTFS_SB(sb); |
2624 | ntfs_inode *mft_ni = NTFS_I(vol->mft_ino); | 2625 | ntfs_inode *mft_ni = NTFS_I(vol->mft_ino); |