diff options
author | Jeff Layton <jlayton@redhat.com> | 2018-01-09 08:21:17 -0500 |
---|---|---|
committer | Jeff Layton <jlayton@redhat.com> | 2018-01-29 06:42:21 -0500 |
commit | 1eb5d98f16f6d71af8781436d2b0bcf9236f7fc6 (patch) | |
tree | 9fc2e9515a9762e2711f3c3078d4ab865492f0d4 /fs/nfs/delegation.c | |
parent | ee73f9a52a34377887acfa3b76169709e80d577c (diff) | |
download | linux-1eb5d98f16f6d71af8781436d2b0bcf9236f7fc6.tar.bz2 |
nfs: convert to new i_version API
For NFS, we just use the "raw" API since the i_version is mostly
managed by the server. The exception there is when the client
holds a write delegation, but we only need to bump it once
there anyway to handle CB_GETATTR.
Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r-- | fs/nfs/delegation.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index ade44ca0c66c..d8b47624fee2 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -12,6 +12,7 @@ #include <linux/sched.h> #include <linux/slab.h> #include <linux/spinlock.h> +#include <linux/iversion.h> #include <linux/nfs4.h> #include <linux/nfs_fs.h> @@ -347,7 +348,7 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs4_stateid_copy(&delegation->stateid, &res->delegation); delegation->type = res->delegation_type; delegation->pagemod_limit = res->pagemod_limit; - delegation->change_attr = inode->i_version; + delegation->change_attr = inode_peek_iversion_raw(inode); delegation->cred = get_rpccred(cred); delegation->inode = inode; delegation->flags = 1<<NFS_DELEGATION_REFERENCED; |