Commit b876d708 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFS: fix nfs_fetch_iversion()



The change attribute is always set by all NFS client versions so get rid
of the open-coded version.

Fixes: 3cc55f44 ("nfs: use change attribute for NFS re-exports")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 98b5cee3
Loading
Loading
Loading
Loading
+4 −11
Original line number Diff line number Diff line
@@ -171,17 +171,10 @@ static u64 nfs_fetch_iversion(struct inode *inode)
{
	struct nfs_server *server = NFS_SERVER(inode);

	/* Is this the right call?: */
	nfs_revalidate_inode(server, inode);
	/*
	 * Also, note we're ignoring any returned error.  That seems to be
	 * the practice for cache consistency information elsewhere in
	 * the server, but I'm not sure why.
	 */
	if (server->nfs_client->rpc_ops->version >= 4)
	if (nfs_check_cache_invalid(inode, NFS_INO_INVALID_CHANGE |
						   NFS_INO_REVAL_PAGECACHE))
		__nfs_revalidate_inode(server, inode);
	return inode_peek_iversion_raw(inode);
	else
		return time_to_chattr(&inode->i_ctime);
}

const struct export_operations nfs_export_ops = {