Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188741
b: refs/heads/master
c: 195d3ce
h: refs/heads/master
i:
  188739: f2cffbc
v: v3
  • Loading branch information
Sage Weil committed Mar 1, 2010
1 parent 58265a3 commit 694e834
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 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: 6f863e712d4114e8ae2f02de64ebeac0546ebaa0
refs/heads/master: 195d3ce2cc9a8ec69827f6369c41b269345b9988
9 changes: 6 additions & 3 deletions trunk/fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1923,14 +1923,17 @@ static int try_get_cap_refs(struct ceph_inode_info *ci, int need, int want,
struct inode *inode = &ci->vfs_inode;
int ret = 0;
int have, implemented;
int file_wanted;

dout("get_cap_refs %p need %s want %s\n", inode,
ceph_cap_string(need), ceph_cap_string(want));
spin_lock(&inode->i_lock);

/* make sure we _have_ some caps! */
if (!__ceph_is_any_caps(ci)) {
dout("get_cap_refs %p no real caps\n", inode);
/* make sure file is actually open */
file_wanted = __ceph_caps_file_wanted(ci);
if ((file_wanted & need) == 0) {
dout("try_get_cap_refs need %s file_wanted %s, EBADF\n",
ceph_cap_string(need), ceph_cap_string(file_wanted));
*err = -EBADF;
ret = 1;
goto out;
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/ceph/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ int ceph_release(struct inode *inode, struct file *file)
kfree(cf->dir_info);
dput(cf->dentry);
kmem_cache_free(ceph_file_cachep, cf);

/* wake up anyone waiting for caps on this inode */
wake_up(&ci->i_cap_wq);
return 0;
}

Expand Down

0 comments on commit 694e834

Please sign in to comment.