Commit 9bae113a authored by Sage Weil's avatar Sage Weil

ceph: only link open operations to directory unsafe list if O_CREAT|O_TRUNC

We only need to put these on the directory unsafe list if they have
side effects that fsync(2) should flush out.
Reviewed-by: default avatarYehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent acda7657
...@@ -194,7 +194,8 @@ int ceph_open(struct inode *inode, struct file *file) ...@@ -194,7 +194,8 @@ int ceph_open(struct inode *inode, struct file *file)
req->r_inode = inode; req->r_inode = inode;
ihold(inode); ihold(inode);
req->r_num_caps = 1; req->r_num_caps = 1;
err = ceph_mdsc_do_request(mdsc, parent_inode, req); err = ceph_mdsc_do_request(mdsc, (flags & (O_CREAT|O_TRUNC)) ?
parent_inode : NULL, req);
if (!err) if (!err)
err = ceph_init_file(inode, file, req->r_fmode); err = ceph_init_file(inode, file, req->r_fmode);
ceph_mdsc_put_request(req); ceph_mdsc_put_request(req);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment