Skip to content

Commit bf73c62

Browse files
ukernelidryomov
authored andcommitted
ceph: check all mds' caps after page writeback
If an inode has caps from multiple mds's, the following can happen: - non-auth mds revokes Fsc. Fcb is used, so page writeback is queued. - when writeback finishes, ceph_check_caps() is called with auth only flag. ceph_check_caps() invalidates pagecache, but skips checking any non-auth caps. Signed-off-by: "Yan, Zheng" <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 11ba6b9 commit bf73c62

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fs/ceph/caps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3062,7 +3062,7 @@ void ceph_put_wrbuffer_cap_refs(struct ceph_inode_info *ci, int nr,
30623062
spin_unlock(&ci->i_ceph_lock);
30633063

30643064
if (last) {
3065-
ceph_check_caps(ci, CHECK_CAPS_AUTHONLY, NULL);
3065+
ceph_check_caps(ci, 0, NULL);
30663066
} else if (flush_snaps) {
30673067
ceph_flush_snaps(ci, NULL);
30683068
}

fs/ceph/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,7 @@ void __ceph_do_pending_vmtruncate(struct inode *inode)
19841984
mutex_unlock(&ci->i_truncate_mutex);
19851985

19861986
if (wrbuffer_refs == 0)
1987-
ceph_check_caps(ci, CHECK_CAPS_AUTHONLY, NULL);
1987+
ceph_check_caps(ci, 0, NULL);
19881988

19891989
wake_up_all(&ci->i_cap_wq);
19901990
}

0 commit comments

Comments
 (0)