[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>
This commit is contained in:
committed by
Linus Torvalds
parent
454e2398be
commit
726c334223
@@ -2601,10 +2601,10 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol,
|
||||
|
||||
/**
|
||||
* ntfs_statfs - return information about mounted NTFS volume
|
||||
* @sb: super block of mounted volume
|
||||
* @dentry: dentry from mounted volume
|
||||
* @sfs: statfs structure in which to return the information
|
||||
*
|
||||
* Return information about the mounted NTFS volume @sb in the statfs structure
|
||||
* Return information about the mounted NTFS volume @dentry in the statfs structure
|
||||
* pointed to by @sfs (this is initialized with zeros before ntfs_statfs is
|
||||
* called). We interpret the values to be correct of the moment in time at
|
||||
* 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,
|
||||
*
|
||||
* Return 0 on success or -errno on error.
|
||||
*/
|
||||
static int ntfs_statfs(struct super_block *sb, struct kstatfs *sfs)
|
||||
static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs)
|
||||
{
|
||||
struct super_block *sb = dentry->d_sb;
|
||||
s64 size;
|
||||
ntfs_volume *vol = NTFS_SB(sb);
|
||||
ntfs_inode *mft_ni = NTFS_I(vol->mft_ino);
|
||||
|
Reference in New Issue
Block a user