From 2fa20bda5797a3ff6b20ee0b858bbd9e3f49e966 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 22 Aug 2006 20:06:10 -0400 Subject: [PATCH] --- yaml --- r: 34759 b: refs/heads/master c: 0c7d90cfed91a283228017ba6faf37ee0bcd32b1 h: refs/heads/master i: 34757: 25784b0581aac940d8a30d316ad1e655daf56f10 34755: 7e6303ca14c06ad06ba66f9952079a77f9da77fa 34751: e3ae956b8153a8bdcb9dbbe9357ef966258d9099 v: v3 --- [refs] | 2 +- trunk/fs/nfs/super.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 803108312dcf..8816d1ad719a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 24c8dbbb5f777187d660393599641ab3307b4b97 +refs/heads/master: 0c7d90cfed91a283228017ba6faf37ee0bcd32b1 diff --git a/trunk/fs/nfs/super.c b/trunk/fs/nfs/super.c index f97d7d9c5c32..a41d516ed595 100644 --- a/trunk/fs/nfs/super.c +++ b/trunk/fs/nfs/super.c @@ -240,11 +240,10 @@ void __exit unregister_nfs_fs(void) */ static int nfs_statfs(struct dentry *dentry, struct kstatfs *buf) { - struct super_block *sb = dentry->d_sb; - struct nfs_server *server = NFS_SB(sb); + struct nfs_server *server = NFS_SB(dentry->d_sb); unsigned char blockbits; unsigned long blockres; - struct nfs_fh *rootfh = NFS_FH(sb->s_root->d_inode); + struct nfs_fh *fh = NFS_FH(dentry->d_inode); struct nfs_fattr fattr; struct nfs_fsstat res = { .fattr = &fattr, @@ -253,7 +252,7 @@ static int nfs_statfs(struct dentry *dentry, struct kstatfs *buf) lock_kernel(); - error = server->rpc_ops->statfs(server, rootfh, &res); + error = server->rpc_ops->statfs(server, fh, &res); buf->f_type = NFS_SUPER_MAGIC; if (error < 0) goto out_err; @@ -263,7 +262,7 @@ static int nfs_statfs(struct dentry *dentry, struct kstatfs *buf) * case where f_frsize != f_bsize. Eventually we want to * report the value of wtmult in this field. */ - buf->f_frsize = sb->s_blocksize; + buf->f_frsize = dentry->d_sb->s_blocksize; /* * On most *nix systems, f_blocks, f_bfree, and f_bavail @@ -272,8 +271,8 @@ static int nfs_statfs(struct dentry *dentry, struct kstatfs *buf) * thus historically Linux's sys_statfs reports these * fields in units of f_bsize. */ - buf->f_bsize = sb->s_blocksize; - blockbits = sb->s_blocksize_bits; + buf->f_bsize = dentry->d_sb->s_blocksize; + blockbits = dentry->d_sb->s_blocksize_bits; blockres = (1 << blockbits) - 1; buf->f_blocks = (res.tbytes + blockres) >> blockbits; buf->f_bfree = (res.fbytes + blockres) >> blockbits;