summaryrefslogtreecommitdiffstats
path: root/fs/nfs/fscache-index.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2018-01-09 14:21:17 +0100
committerJeff Layton <jlayton@redhat.com>2018-01-29 12:42:21 +0100
commit1eb5d98f16f6d71af8781436d2b0bcf9236f7fc6 (patch)
tree9fc2e9515a9762e2711f3c3078d4ab865492f0d4 /fs/nfs/fscache-index.c
parentext4: convert to new i_version API (diff)
downloadlinux-1eb5d98f16f6d71af8781436d2b0bcf9236f7fc6.tar.xz
linux-1eb5d98f16f6d71af8781436d2b0bcf9236f7fc6.zip
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/fscache-index.c')
-rw-r--r--fs/nfs/fscache-index.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/fscache-index.c b/fs/nfs/fscache-index.c
index 3025fe8584a0..0ee4b93d36ea 100644
--- a/fs/nfs/fscache-index.c
+++ b/fs/nfs/fscache-index.c
@@ -16,6 +16,7 @@
#include <linux/nfs_fs.h>
#include <linux/nfs_fs_sb.h>
#include <linux/in6.h>
+#include <linux/iversion.h>
#include "internal.h"
#include "fscache.h"
@@ -211,7 +212,7 @@ static uint16_t nfs_fscache_inode_get_aux(const void *cookie_netfs_data,
auxdata.ctime = nfsi->vfs_inode.i_ctime;
if (NFS_SERVER(&nfsi->vfs_inode)->nfs_client->rpc_ops->version == 4)
- auxdata.change_attr = nfsi->vfs_inode.i_version;
+ auxdata.change_attr = inode_peek_iversion_raw(&nfsi->vfs_inode);
if (bufmax > sizeof(auxdata))
bufmax = sizeof(auxdata);
@@ -243,7 +244,7 @@ enum fscache_checkaux nfs_fscache_inode_check_aux(void *cookie_netfs_data,
auxdata.ctime = nfsi->vfs_inode.i_ctime;
if (NFS_SERVER(&nfsi->vfs_inode)->nfs_client->rpc_ops->version == 4)
- auxdata.change_attr = nfsi->vfs_inode.i_version;
+ auxdata.change_attr = inode_peek_iversion_raw(&nfsi->vfs_inode);
if (memcmp(data, &auxdata, datalen) != 0)
return FSCACHE_CHECKAUX_OBSOLETE;