aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-05-04 11:33:47 -0700
committerSage Weil <sage@newdream.net>2011-05-04 12:56:45 -0700
commitfca65b4ad72d28cbb43a029114d04b89f06faadb (patch)
treeaf7a0d64fa632c45a064d49f8d09f6874b1f7533 /fs/ceph/inode.c
parentlibceph: fix ceph_osdc_alloc_request error checks (diff)
downloadlinux-dev-fca65b4ad72d28cbb43a029114d04b89f06faadb.tar.xz
linux-dev-fca65b4ad72d28cbb43a029114d04b89f06faadb.zip
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 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)
int release = 0, dirtied = 0;
int mask = 0;
int err = 0;
+ int inode_dirty_flags = 0;
if (ceph_snap(inode) != CEPH_NOSNAP)
return -EROFS;
@@ -1725,13 +1726,16 @@ int ceph_setattr(struct dentry *dentry, struct iattr *attr)
dout("setattr %p ATTR_FILE ... hrm!\n", inode);
if (dirtied) {
- __ceph_mark_dirty_caps(ci, dirtied);
+ inode_dirty_flags = __ceph_mark_dirty_caps(ci, dirtied);
inode->i_ctime = CURRENT_TIME;
}
release &= issued;
spin_unlock(&inode->i_lock);
+ if (inode_dirty_flags)
+ __mark_inode_dirty(inode, inode_dirty_flags);
+
if (mask) {
req->r_inode = igrab(inode);
req->r_inode_drop = release;