summaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-05-04 20:33:47 +0200
committerSage Weil <sage@newdream.net>2011-05-04 21:56:45 +0200
commitfca65b4ad72d28cbb43a029114d04b89f06faadb (patch)
treeaf7a0d64fa632c45a064d49f8d09f6874b1f7533 /fs/ceph/file.c
parentlibceph: fix ceph_osdc_alloc_request error checks (diff)
downloadlinux-fca65b4ad72d28cbb43a029114d04b89f06faadb.tar.xz
linux-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/file.c')
-rw-r--r--fs/ceph/file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 159b512d5a27..203252d88d9f 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -734,9 +734,12 @@ retry_snap:
}
}
if (ret >= 0) {
+ int dirty;
spin_lock(&inode->i_lock);
- __ceph_mark_dirty_caps(ci, CEPH_CAP_FILE_WR);
+ dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_FILE_WR);
spin_unlock(&inode->i_lock);
+ if (dirty)
+ __mark_inode_dirty(inode, dirty);
}
out: