Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34759
b: refs/heads/master
c: 0c7d90c
h: refs/heads/master
i:
  34757: 25784b0
  34755: 7e6303c
  34751: e3ae956
v: v3
  • Loading branch information
David Howells authored and Trond Myklebust committed Sep 23, 2006
1 parent 7b16afa commit 2fa20bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 24c8dbbb5f777187d660393599641ab3307b4b97
refs/heads/master: 0c7d90cfed91a283228017ba6faf37ee0bcd32b1
13 changes: 6 additions & 7 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand All @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 2fa20bd

Please sign in to comment.