projects
/
platform
/
kernel
/
kernel-mfld-blackbay.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12a2f64
)
ceph: fix rare potential cap leak
author
Sage Weil
<sage@newdream.net>
Thu, 12 May 2011 22:13:23 +0000
(15:13 -0700)
committer
Sage Weil
<sage@newdream.net>
Thu, 19 May 2011 18:25:03 +0000
(11:25 -0700)
If we grab new_cap, retake the lock, and find we already have a cap now
for the given mds, release new_cap.
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/caps.c
patch
|
blob
|
history
diff --git
a/fs/ceph/caps.c
b/fs/ceph/caps.c
index
2a5404c
..
591202b
100644
(file)
--- a/
fs/ceph/caps.c
+++ b/
fs/ceph/caps.c
@@
-569,7
+569,8
@@
retry:
list_add_tail(&cap->session_caps, &session->s_caps);
session->s_nr_caps++;
spin_unlock(&session->s_cap_lock);
- }
+ } else if (new_cap)
+ ceph_put_cap(mdsc, new_cap);
if (!ci->i_snap_realm) {
/*