diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/super.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index dd589dee1eea..98d1ab8bf8f2 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -423,15 +423,19 @@ static int nfs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
423 | unsigned char blockbits; | 423 | unsigned char blockbits; |
424 | unsigned long blockres; | 424 | unsigned long blockres; |
425 | struct nfs_fh *fh = NFS_FH(dentry->d_inode); | 425 | struct nfs_fh *fh = NFS_FH(dentry->d_inode); |
426 | struct nfs_fattr fattr; | 426 | struct nfs_fsstat res; |
427 | struct nfs_fsstat res = { | 427 | int error = -ENOMEM; |
428 | .fattr = &fattr, | 428 | |
429 | }; | 429 | res.fattr = nfs_alloc_fattr(); |
430 | int error; | 430 | if (res.fattr == NULL) |
431 | goto out_err; | ||
431 | 432 | ||
432 | error = server->nfs_client->rpc_ops->statfs(server, fh, &res); | 433 | error = server->nfs_client->rpc_ops->statfs(server, fh, &res); |
434 | |||
435 | nfs_free_fattr(res.fattr); | ||
433 | if (error < 0) | 436 | if (error < 0) |
434 | goto out_err; | 437 | goto out_err; |
438 | |||
435 | buf->f_type = NFS_SUPER_MAGIC; | 439 | buf->f_type = NFS_SUPER_MAGIC; |
436 | 440 | ||
437 | /* | 441 | /* |