aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/9p/cache.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/9p/cache.c b/fs/9p/cache.c
index 2b7a032c37bc..a69260f27555 100644
--- a/fs/9p/cache.c
+++ b/fs/9p/cache.c
@@ -239,13 +239,12 @@ void v9fs_cache_inode_flush_cookie(struct inode *inode)
239void v9fs_cache_inode_set_cookie(struct inode *inode, struct file *filp) 239void v9fs_cache_inode_set_cookie(struct inode *inode, struct file *filp)
240{ 240{
241 struct v9fs_inode *v9inode = V9FS_I(inode); 241 struct v9fs_inode *v9inode = V9FS_I(inode);
242 struct p9_fid *fid;
243 242
244 if (!v9inode->fscache) 243 if (!v9inode->fscache)
245 return; 244 return;
246 245
247 spin_lock(&v9inode->fscache_lock); 246 spin_lock(&v9inode->fscache_lock);
248 fid = filp->private_data; 247
249 if ((filp->f_flags & O_ACCMODE) != O_RDONLY) 248 if ((filp->f_flags & O_ACCMODE) != O_RDONLY)
250 v9fs_cache_inode_flush_cookie(inode); 249 v9fs_cache_inode_flush_cookie(inode);
251 else 250 else