/* Decide if we should enable or disable local caching for this inode. */
void nfs_fscache_set_inode_cookie(struct inode *inode, struct file *filp)
/* Decide if we should enable or disable local caching for this inode. */
void nfs_fscache_set_inode_cookie(struct inode *inode, struct file *filp)
{
	if (NFS_FSCACHE(inode)) {
		nfs_fscache_inode_lock(inode);
		if ((filp->f_flags & O_ACCMODE) != O_RDONLY)
			nfs_fscache_disable_inode_cookie(inode);
		else
			nfs_fscache_enable_inode_cookie(inode);
		nfs_fscache_inode_unlock(inode);
	}
}