diff options
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index db122bb357b8..57d9b44a8820 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -2334,6 +2334,7 @@ static int handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, | |||
2334 | revoked_rdcache) | 2334 | revoked_rdcache) |
2335 | reply = 2; /* send revoke ack in check_caps */ | 2335 | reply = 2; /* send revoke ack in check_caps */ |
2336 | cap->issued = newcaps; | 2336 | cap->issued = newcaps; |
2337 | cap->implemented |= newcaps; | ||
2337 | } else if (cap->issued == newcaps) { | 2338 | } else if (cap->issued == newcaps) { |
2338 | dout("caps unchanged: %s -> %s\n", | 2339 | dout("caps unchanged: %s -> %s\n", |
2339 | ceph_cap_string(cap->issued), ceph_cap_string(newcaps)); | 2340 | ceph_cap_string(cap->issued), ceph_cap_string(newcaps)); |
@@ -2346,6 +2347,7 @@ static int handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, | |||
2346 | * pending revocation */ | 2347 | * pending revocation */ |
2347 | wake = 1; | 2348 | wake = 1; |
2348 | } | 2349 | } |
2350 | BUG_ON(cap->issued & ~cap->implemented); | ||
2349 | 2351 | ||
2350 | spin_unlock(&inode->i_lock); | 2352 | spin_unlock(&inode->i_lock); |
2351 | if (writeback) | 2353 | if (writeback) |