aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-05-04 14:33:47 -0400
committerSage Weil <sage@newdream.net>2011-05-04 15:56:45 -0400
commitfca65b4ad72d28cbb43a029114d04b89f06faadb (patch)
treeaf7a0d64fa632c45a064d49f8d09f6874b1f7533 /fs/ceph/inode.c
parent4ad12621e442b7a072e81270808f617cb65c5672 (diff)
ceph: do not call __mark_dirty_inode under i_lock
The __mark_dirty_inode helper now takes i_lock as of 250df6ed. Fix the one ceph callers that held i_lock (__ceph_mark_dirty_caps) to return the flags value so that the callers can do it outside of i_lock. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r--fs/ceph/inode.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index b54c97da1c4..03d6dafda61 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;