diff options
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index b54c97da1c43..03d6dafda61f 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -1567,6 +1567,7 @@ int ceph_setattr(struct dentry *dentry, struct iattr *attr) | |||
1567 | int release = 0, dirtied = 0; | 1567 | int release = 0, dirtied = 0; |
1568 | int mask = 0; | 1568 | int mask = 0; |
1569 | int err = 0; | 1569 | int err = 0; |
1570 | int inode_dirty_flags = 0; | ||
1570 | 1571 | ||
1571 | if (ceph_snap(inode) != CEPH_NOSNAP) | 1572 | if (ceph_snap(inode) != CEPH_NOSNAP) |
1572 | return -EROFS; | 1573 | return -EROFS; |
@@ -1725,13 +1726,16 @@ int ceph_setattr(struct dentry *dentry, struct iattr *attr) | |||
1725 | dout("setattr %p ATTR_FILE ... hrm!\n", inode); | 1726 | dout("setattr %p ATTR_FILE ... hrm!\n", inode); |
1726 | 1727 | ||
1727 | if (dirtied) { | 1728 | if (dirtied) { |
1728 | __ceph_mark_dirty_caps(ci, dirtied); | 1729 | inode_dirty_flags = __ceph_mark_dirty_caps(ci, dirtied); |
1729 | inode->i_ctime = CURRENT_TIME; | 1730 | inode->i_ctime = CURRENT_TIME; |
1730 | } | 1731 | } |
1731 | 1732 | ||
1732 | release &= issued; | 1733 | release &= issued; |
1733 | spin_unlock(&inode->i_lock); | 1734 | spin_unlock(&inode->i_lock); |
1734 | 1735 | ||
1736 | if (inode_dirty_flags) | ||
1737 | __mark_inode_dirty(inode, inode_dirty_flags); | ||
1738 | |||
1735 | if (mask) { | 1739 | if (mask) { |
1736 | req->r_inode = igrab(inode); | 1740 | req->r_inode = igrab(inode); |
1737 | req->r_inode_drop = release; | 1741 | req->r_inode_drop = release; |