mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
NFS: Reduce stack footprint of nfs_statfs()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
987f8dfc98
commit
ca7e9a0df2
@ -423,15 +423,19 @@ static int nfs_statfs(struct dentry *dentry, struct kstatfs *buf)
|
|||||||
unsigned char blockbits;
|
unsigned char blockbits;
|
||||||
unsigned long blockres;
|
unsigned long blockres;
|
||||||
struct nfs_fh *fh = NFS_FH(dentry->d_inode);
|
struct nfs_fh *fh = NFS_FH(dentry->d_inode);
|
||||||
struct nfs_fattr fattr;
|
struct nfs_fsstat res;
|
||||||
struct nfs_fsstat res = {
|
int error = -ENOMEM;
|
||||||
.fattr = &fattr,
|
|
||||||
};
|
res.fattr = nfs_alloc_fattr();
|
||||||
int error;
|
if (res.fattr == NULL)
|
||||||
|
goto out_err;
|
||||||
|
|
||||||
error = server->nfs_client->rpc_ops->statfs(server, fh, &res);
|
error = server->nfs_client->rpc_ops->statfs(server, fh, &res);
|
||||||
|
|
||||||
|
nfs_free_fattr(res.fattr);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
goto out_err;
|
goto out_err;
|
||||||
|
|
||||||
buf->f_type = NFS_SUPER_MAGIC;
|
buf->f_type = NFS_SUPER_MAGIC;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user