diff options
author | Sage Weil <sage@newdream.net> | 2011-05-04 22:33:47 +0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-05-04 23:56:45 +0400 |
commit | fca65b4ad72d28cbb43a029114d04b89f06faadb (patch) | |
tree | af7a0d64fa632c45a064d49f8d09f6874b1f7533 /fs/ceph/caps.c | |
parent | 4ad12621e442b7a072e81270808f617cb65c5672 (diff) | |
download | linux-fca65b4ad72d28cbb43a029114d04b89f06faadb.tar.xz |
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/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 010ba9c52e9b..9fa08662a88d 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1331,10 +1331,11 @@ static void ceph_flush_snaps(struct ceph_inode_info *ci) } /* - * Mark caps dirty. If inode is newly dirty, add to the global dirty - * list. + * Mark caps dirty. If inode is newly dirty, return the dirty flags. + * Caller is then responsible for calling __mark_inode_dirty with the + * returned flags value. */ -void __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask) +int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask) { struct ceph_mds_client *mdsc = ceph_sb_to_client(ci->vfs_inode.i_sb)->mdsc; @@ -1365,9 +1366,8 @@ void __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask) if (((was | ci->i_flushing_caps) & CEPH_CAP_FILE_BUFFER) && (mask & CEPH_CAP_FILE_BUFFER)) dirty |= I_DIRTY_DATASYNC; - if (dirty) - __mark_inode_dirty(inode, dirty); __cap_delay_requeue(mdsc, ci); + return dirty; } /* |