Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200846
b: refs/heads/master
c: 443b376
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed Jun 29, 2010
1 parent ed15e38 commit d38f267
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: ec97f88ba6d4256927fde516033ee76d5d85b54a
refs/heads/master: 443b3760a06860187f135c1ecd56c2c7d4ad1022
10 changes: 8 additions & 2 deletions trunk/fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,14 @@ static struct ceph_cap *get_cap(struct ceph_cap_reservation *ctx)
struct ceph_cap *cap = NULL;

/* temporary, until we do something about cap import/export */
if (!ctx)
return kmem_cache_alloc(ceph_cap_cachep, GFP_NOFS);
if (!ctx) {
cap = kmem_cache_alloc(ceph_cap_cachep, GFP_NOFS);
if (cap) {
caps_use_count++;
caps_total_count++;
}
return cap;
}

spin_lock(&caps_list_lock);
dout("get_cap ctx=%p (%d) %d = %d used + %d resv + %d avail\n",
Expand Down

0 comments on commit d38f267

Please sign in to comment.