aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/ioctl.c
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-02-05 16:52:29 -0500
committerYan, Zheng <zheng.z.yan@intel.com>2014-04-02 22:33:52 -0400
commit752c8bdcfe88f27a17c5c9264df928fd145a4b30 (patch)
tree755eb2453b772e826113fe30d9184870efb012c0 /fs/ceph/ioctl.c
parent180061a58c17681dd236e5059ba57fe092dbe368 (diff)
ceph: do not chain inode updates to parent fsync
The fsync(dirfd) only covers namespace operations, not inode updates. We do not need to cover setattr variants or O_TRUNC. Reported-by: Al Viro <viro@xeniv.linux.org.uk> Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'fs/ceph/ioctl.c')
-rw-r--r--fs/ceph/ioctl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c
index dc66c9e023e4..efbe08289292 100644
--- a/fs/ceph/ioctl.c
+++ b/fs/ceph/ioctl.c
@@ -64,7 +64,6 @@ static long __validate_layout(struct ceph_mds_client *mdsc,
64static long ceph_ioctl_set_layout(struct file *file, void __user *arg) 64static long ceph_ioctl_set_layout(struct file *file, void __user *arg)
65{ 65{
66 struct inode *inode = file_inode(file); 66 struct inode *inode = file_inode(file);
67 struct inode *parent_inode;
68 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; 67 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc;
69 struct ceph_mds_request *req; 68 struct ceph_mds_request *req;
70 struct ceph_ioctl_layout l; 69 struct ceph_ioctl_layout l;
@@ -121,9 +120,7 @@ static long ceph_ioctl_set_layout(struct file *file, void __user *arg)
121 cpu_to_le32(l.object_size); 120 cpu_to_le32(l.object_size);
122 req->r_args.setlayout.layout.fl_pg_pool = cpu_to_le32(l.data_pool); 121 req->r_args.setlayout.layout.fl_pg_pool = cpu_to_le32(l.data_pool);
123 122
124 parent_inode = ceph_get_dentry_parent_inode(file->f_dentry); 123 err = ceph_mdsc_do_request(mdsc, NULL, req);
125 err = ceph_mdsc_do_request(mdsc, parent_inode, req);
126 iput(parent_inode);
127 ceph_mdsc_put_request(req); 124 ceph_mdsc_put_request(req);
128 return err; 125 return err;
129} 126}