diff options
author | Sage Weil <sage@newdream.net> | 2010-02-09 13:41:47 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-02-11 11:48:52 -0800 |
commit | 68c283236a1e0772e1a469dd2ffc17afc300b07b (patch) | |
tree | 6bdca5168713dab721f5458487e3c9d218d24726 /fs/ceph/caps.c | |
parent | cbd03635913a86afb7c2cfc0058932956b05b51e (diff) |
ceph: do not retain caps that are being revoked
Never retain caps in __send_cap() that are being revoked.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 822f7d3632fe..7f4841cd3a2b 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1042,10 +1042,7 @@ static int __send_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap, struct ceph_inode_info *ci = cap->ci; struct inode *inode = &ci->vfs_inode; u64 cap_id = cap->cap_id; - int held = cap->issued | cap->implemented; - int revoking = cap->implemented & ~cap->issued; - int dropping = cap->issued & ~retain; - int keep; + int held, revoking, dropping, keep; u64 seq, issue_seq, mseq, time_warp_seq, follows; u64 size, max_size; struct timespec mtime, atime; @@ -1060,6 +1057,11 @@ static int __send_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap, int i; int ret; + held = cap->issued | cap->implemented; + revoking = cap->implemented & ~cap->issued; + retain &= ~revoking; + dropping = cap->issued & ~retain; + dout("__send_cap %p cap %p session %p %s -> %s (revoking %s)\n", inode, cap, cap->session, ceph_cap_string(held), ceph_cap_string(held & retain), |