Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ceph: wake up the waiters if any new caps comes

When new caps comes we need to wake up the waiters and also when
revoking the caps, there also could be new caps comes.

Link: https://tracker.ceph.com/issues/54044
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>

authored by

Xiubo Li and committed by
Ilya Dryomov
f7913573 da4ab869

+4
+4
fs/ceph/caps.c
··· 754 754 cap->issue_seq = seq; 755 755 cap->mseq = mseq; 756 756 cap->cap_gen = gen; 757 + wake_up_all(&ci->i_cap_wq); 757 758 } 758 759 759 760 /* ··· 3551 3550 check_caps = 1; /* check auth cap only */ 3552 3551 else 3553 3552 check_caps = 2; /* check all caps */ 3553 + /* If there is new caps, try to wake up the waiters */ 3554 + if (~cap->issued & newcaps) 3555 + wake = true; 3554 3556 cap->issued = newcaps; 3555 3557 cap->implemented |= newcaps; 3556 3558 } else if (cap->issued == newcaps) {