summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
authorJ. Bruce Fields2017-05-11 20:45:06 +0200
committerJ. Bruce Fields2017-07-12 21:55:00 +0200
commit630458e730b82efe1f6eb90e6bcabad02fe76e20 (patch)
treea71f8715cbd69020f99cb9a5942b3ec16f4baefa /fs/nfsd/nfs4xdr.c
parentsvcrdma: Remove svc_rdma_chunk_ctxt::cc_dir field (diff)
downloadkernel-qcow2-linux-630458e730b82efe1f6eb90e6bcabad02fe76e20.tar.gz
kernel-qcow2-linux-630458e730b82efe1f6eb90e6bcabad02fe76e20.tar.xz
kernel-qcow2-linux-630458e730b82efe1f6eb90e6bcabad02fe76e20.zip
nfsd4: factor ctime into change attribute
Factoring ctime into the nfsv4 change attribute gives us better properties than just i_version alone. Eventually we'll likely also expose this (as opposed to raw i_version) to userspace, at which point we'll want to move it to a common helper, called from either userspace or individual filesystems. For now, nfsd is the only user. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 54e212e3541e..20fbcab97753 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1973,7 +1973,7 @@ static __be32 *encode_change(__be32 *p, struct kstat *stat, struct inode *inode,
*p++ = cpu_to_be32(convert_to_wallclock(exp->cd->flush_time));
*p++ = 0;
} else if (IS_I_VERSION(inode)) {
- p = xdr_encode_hyper(p, inode->i_version);
+ p = xdr_encode_hyper(p, nfsd4_change_attribute(inode));
} else {
*p++ = cpu_to_be32(stat->ctime.tv_sec);
*p++ = cpu_to_be32(stat->ctime.tv_nsec);