summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-03-03 14:38:56 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-03-03 14:38:56 -0500
commit590dce2d4934fb909b112cd80c80486362337744 (patch)
tree9c46dfa627c0adb639ee1542fffbc2262727ef36 /fs/nfsd
parente0d072250a54669dce876d8ade70e417356aae74 (diff)
parenta528d35e8bfcc521d7cb70aaf03e1bd296c8493f (diff)
Merge branch 'rebased-statx' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs 'statx()' update from Al Viro. This adds the new extended stat() interface that internally subsumes our previous stat interfaces, and allows user mode to specify in more detail what kind of information it wants. It also allows for some explicit synchronization information to be passed to the filesystem, which can be relevant for network filesystems: is the cached value ok, or do you need open/close consistency, or what? From David Howells. Andreas Dilger points out that the first version of the extended statx interface was posted June 29, 2010: https://www.spinics.net/lists/linux-fsdevel/msg33831.html * 'rebased-statx' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: statx: Add a system call to make enhanced file info available
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4xdr.c4
-rw-r--r--fs/nfsd/vfs.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 382c1fd05b4c..33017d652b1d 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2301,7 +2301,7 @@ static int get_parent_attributes(struct svc_export *exp, struct kstat *stat)
2301 if (path.dentry != path.mnt->mnt_root) 2301 if (path.dentry != path.mnt->mnt_root)
2302 break; 2302 break;
2303 } 2303 }
2304 err = vfs_getattr(&path, stat); 2304 err = vfs_getattr(&path, stat, STATX_BASIC_STATS, AT_STATX_SYNC_AS_STAT);
2305 path_put(&path); 2305 path_put(&path);
2306 return err; 2306 return err;
2307} 2307}
@@ -2385,7 +2385,7 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
2385 goto out; 2385 goto out;
2386 } 2386 }
2387 2387
2388 err = vfs_getattr(&path, &stat); 2388 err = vfs_getattr(&path, &stat, STATX_BASIC_STATS, AT_STATX_SYNC_AS_STAT);
2389 if (err) 2389 if (err)
2390 goto out_nfserr; 2390 goto out_nfserr;
2391 if ((bmval0 & (FATTR4_WORD0_FILES_AVAIL | FATTR4_WORD0_FILES_FREE | 2391 if ((bmval0 & (FATTR4_WORD0_FILES_AVAIL | FATTR4_WORD0_FILES_FREE |
diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h
index db98c48c735a..1bbdccecbf3d 100644
--- a/fs/nfsd/vfs.h
+++ b/fs/nfsd/vfs.h
@@ -135,7 +135,8 @@ static inline __be32 fh_getattr(struct svc_fh *fh, struct kstat *stat)
135{ 135{
136 struct path p = {.mnt = fh->fh_export->ex_path.mnt, 136 struct path p = {.mnt = fh->fh_export->ex_path.mnt,
137 .dentry = fh->fh_dentry}; 137 .dentry = fh->fh_dentry};
138 return nfserrno(vfs_getattr(&p, stat)); 138 return nfserrno(vfs_getattr(&p, stat, STATX_BASIC_STATS,
139 AT_STATX_SYNC_AS_STAT));
139} 140}
140 141
141static inline int nfsd_create_is_exclusive(int createmode) 142static inline int nfsd_create_is_exclusive(int createmode)