Skip to content

Commit

Permalink
Merge PR ceph#22080 into master
Browse files Browse the repository at this point in the history
* refs/pull/22080/head:
	client: fix issue of revoking non-auth caps

Reviewed-by: Patrick Donnelly <[email protected]>
  • Loading branch information
batrick committed May 20, 2018
2 parents 5ceee88 + 341a911 commit 72db4a2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/client/Client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5105,17 +5105,16 @@ void Client::handle_cap_grant(MetaSession *session, Inode *in, Cap *cap, MClient
else if (revoked & ceph_deleg_caps_for_type(CEPH_DELEGATION_WR))
in->recall_deleg(true);

if (((used & ~new_caps) & CEPH_CAP_FILE_BUFFER)
&& !_flush(in, new C_Client_FlushComplete(this, in))) {
if ((used & revoked & CEPH_CAP_FILE_BUFFER) &&
!_flush(in, new C_Client_FlushComplete(this, in))) {
// waitin' for flush
} else if ((old_caps & ~new_caps) & CEPH_CAP_FILE_CACHE) {
} else if (revoked & CEPH_CAP_FILE_CACHE) {
if (_release(in))
check = true;
} else {
cap->wanted = 0; // don't let check_caps skip sending a response to MDS
check = true;
}

} else if (old_caps == new_caps) {
ldout(cct, 10) << " caps unchanged at " << ccap_string(old_caps) << dendl;
} else {
Expand Down

0 comments on commit 72db4a2

Please sign in to comment.