diff options
author | Sage Weil <sage@inktank.com> | 2013-02-05 16:52:29 -0500 |
---|---|---|
committer | Yan, Zheng <zheng.z.yan@intel.com> | 2014-04-02 22:33:52 -0400 |
commit | 752c8bdcfe88f27a17c5c9264df928fd145a4b30 (patch) | |
tree | 755eb2453b772e826113fe30d9184870efb012c0 /fs/ceph/inode.c | |
parent | 180061a58c17681dd236e5059ba57fe092dbe368 (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/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 32d519d8a2e2..8bf2384bd423 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -1627,7 +1627,6 @@ int ceph_setattr(struct dentry *dentry, struct iattr *attr) | |||
1627 | { | 1627 | { |
1628 | struct inode *inode = dentry->d_inode; | 1628 | struct inode *inode = dentry->d_inode; |
1629 | struct ceph_inode_info *ci = ceph_inode(inode); | 1629 | struct ceph_inode_info *ci = ceph_inode(inode); |
1630 | struct inode *parent_inode; | ||
1631 | const unsigned int ia_valid = attr->ia_valid; | 1630 | const unsigned int ia_valid = attr->ia_valid; |
1632 | struct ceph_mds_request *req; | 1631 | struct ceph_mds_request *req; |
1633 | struct ceph_mds_client *mdsc = ceph_sb_to_client(dentry->d_sb)->mdsc; | 1632 | struct ceph_mds_client *mdsc = ceph_sb_to_client(dentry->d_sb)->mdsc; |
@@ -1819,9 +1818,7 @@ int ceph_setattr(struct dentry *dentry, struct iattr *attr) | |||
1819 | req->r_inode_drop = release; | 1818 | req->r_inode_drop = release; |
1820 | req->r_args.setattr.mask = cpu_to_le32(mask); | 1819 | req->r_args.setattr.mask = cpu_to_le32(mask); |
1821 | req->r_num_caps = 1; | 1820 | req->r_num_caps = 1; |
1822 | parent_inode = ceph_get_dentry_parent_inode(dentry); | 1821 | err = ceph_mdsc_do_request(mdsc, NULL, req); |
1823 | err = ceph_mdsc_do_request(mdsc, parent_inode, req); | ||
1824 | iput(parent_inode); | ||
1825 | } | 1822 | } |
1826 | dout("setattr %p result=%d (%s locally, %d remote)\n", inode, err, | 1823 | dout("setattr %p result=%d (%s locally, %d remote)\n", inode, err, |
1827 | ceph_cap_string(dirtied), mask); | 1824 | ceph_cap_string(dirtied), mask); |