pass a struct path to vfs_statfs
We'll need the path to implement the flags field for statvfs support. We do have it available in all callers except: - ecryptfs_statfs. This one doesn't actually need vfs_statfs but just needs to do a caller to the lower filesystem statfs method. - sys_ustat. Add a non-exported statfs_by_dentry helper for it which doesn't won't be able to fill out the flags field later on. In addition rename the helpers for statfs vs fstatfs to do_*statfs instead of the misleading vfs prefix. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
committed by
Al Viro
parent
336fb3b97b
commit
ebabe9a900
@@ -1756,6 +1756,10 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
|
||||
struct nfs4_acl *acl = NULL;
|
||||
struct nfsd4_compoundres *resp = rqstp->rq_resp;
|
||||
u32 minorversion = resp->cstate.minorversion;
|
||||
struct path path = {
|
||||
.mnt = exp->ex_path.mnt,
|
||||
.dentry = dentry,
|
||||
};
|
||||
|
||||
BUG_ON(bmval1 & NFSD_WRITEONLY_ATTRS_WORD1);
|
||||
BUG_ON(bmval0 & ~nfsd_suppattrs0(minorversion));
|
||||
@@ -1776,7 +1780,7 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
|
||||
FATTR4_WORD0_MAXNAME)) ||
|
||||
(bmval1 & (FATTR4_WORD1_SPACE_AVAIL | FATTR4_WORD1_SPACE_FREE |
|
||||
FATTR4_WORD1_SPACE_TOTAL))) {
|
||||
err = vfs_statfs(dentry, &statfs);
|
||||
err = vfs_statfs(&path, &statfs);
|
||||
if (err)
|
||||
goto out_nfserr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user