summaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode_dotl.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V2011-03-08 12:09:49 +0100
committerEric Van Hensbergen2011-03-22 21:43:36 +0100
commit7add697a3d271aa7080513f92dab190c75174b7e (patch)
tree435508f4ab7222c367ea72ca208027218b5f7613 /fs/9p/vfs_inode_dotl.c
parentfs/9p: Open writeback fid in O_SYNC mode (diff)
downloadkernel-qcow2-linux-7add697a3d271aa7080513f92dab190c75174b7e.tar.gz
kernel-qcow2-linux-7add697a3d271aa7080513f92dab190c75174b7e.tar.xz
kernel-qcow2-linux-7add697a3d271aa7080513f92dab190c75174b7e.zip
fs/9p: Attach writeback_fid on first open with WR flag
We don't need writeback fid if we are only doing O_RDONLY open Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_inode_dotl.c')
-rw-r--r--fs/9p/vfs_inode_dotl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 0a0ac30d51d6..8b616dc3567a 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -246,7 +246,8 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
v9inode = V9FS_I(inode);
mutex_lock(&v9inode->v_mutex);
- if (v9ses->cache && !v9inode->writeback_fid) {
+ if (v9ses->cache && !v9inode->writeback_fid &&
+ ((flags & O_ACCMODE) != O_RDONLY)) {
/*
* clone a fid and add it to writeback_fid
* we do it during open time instead of