projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e15b77
)
ceph: Hold caps_list_lock when adjusting caps_{use, total}_count
author
Yan, Zheng
<zheng.z.yan@intel.com>
Sat, 3 Nov 2012 02:32:37 +0000
(10:32 +0800)
committer
Sage Weil
<sage@inktank.com>
Sun, 4 Nov 2012 11:08:24 +0000
(
03:08
-0800)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
fs/ceph/caps.c
patch
|
blob
|
history
diff --git
a/fs/ceph/caps.c
b/fs/ceph/caps.c
index
3251e9c
..
2d0141e
100644
(file)
--- a/
fs/ceph/caps.c
+++ b/
fs/ceph/caps.c
@@
-236,8
+236,10
@@
static struct ceph_cap *get_cap(struct ceph_mds_client *mdsc,
if (!ctx) {
cap = kmem_cache_alloc(ceph_cap_cachep, GFP_NOFS);
if (cap) {
+ spin_lock(&mdsc->caps_list_lock);
mdsc->caps_use_count++;
mdsc->caps_total_count++;
+ spin_unlock(&mdsc->caps_list_lock);
}
return cap;
}