Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200845
b: refs/heads/master
c: ec97f88
h: refs/heads/master
i:
  200843: 94fc886
v: v3
  • Loading branch information
Sage Weil committed Jun 29, 2010
1 parent 5f7b392 commit ed15e38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1a31e734241aefcb2b30fb0cc0376977b6d2ba8
refs/heads/master: ec97f88ba6d4256927fde516033ee76d5d85b54a
11 changes: 6 additions & 5 deletions trunk/fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -2886,18 +2886,19 @@ int ceph_encode_inode_release(void **p, struct inode *inode,
struct ceph_inode_info *ci = ceph_inode(inode);
struct ceph_cap *cap;
struct ceph_mds_request_release *rel = *p;
int used, dirty;
int ret = 0;
int used = 0;

spin_lock(&inode->i_lock);
used = __ceph_caps_used(ci);
dirty = __ceph_caps_dirty(ci);

dout("encode_inode_release %p mds%d used %s drop %s unless %s\n", inode,
mds, ceph_cap_string(used), ceph_cap_string(drop),
dout("encode_inode_release %p mds%d used|dirty %s drop %s unless %s\n",
inode, mds, ceph_cap_string(used|dirty), ceph_cap_string(drop),
ceph_cap_string(unless));

/* only drop unused caps */
drop &= ~used;
/* only drop unused, clean caps */
drop &= ~(used | dirty);

cap = __get_cap_for_mds(ci, mds);
if (cap && __cap_is_valid(cap)) {
Expand Down

0 comments on commit ed15e38

Please sign in to comment.