Commit f7913573 authored by Xiubo Li's avatar Xiubo Li Committed by Ilya Dryomov
Browse files

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: default avatarXiubo Li <xiubli@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent da4ab869
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -754,6 +754,7 @@ void ceph_add_cap(struct inode *inode,
	cap->issue_seq = seq;
	cap->mseq = mseq;
	cap->cap_gen = gen;
	wake_up_all(&ci->i_cap_wq);
}

/*
@@ -3550,6 +3551,9 @@ static void handle_cap_grant(struct inode *inode,
			check_caps = 1; /* check auth cap only */
		else
			check_caps = 2; /* check all caps */
		/* If there is new caps, try to wake up the waiters */
		if (~cap->issued & newcaps)
			wake = true;
		cap->issued = newcaps;
		cap->implemented |= newcaps;
	} else if (cap->issued == newcaps) {