Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347607
b: refs/heads/master
c: a85f50b
h: refs/heads/master
i:
  347605: 69646e8
  347603: edf7461
  347599: 1297d16
v: v3
  • Loading branch information
Yan, Zheng authored and Alex Elder committed Dec 13, 2012
1 parent c864550 commit da012cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 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: 0685235ffd9dbdb9ccbda587f8a3c83ad1d5a921
refs/heads/master: a85f50b6ef93fbbb2ae932ce9b2376509d172796
15 changes: 9 additions & 6 deletions trunk/fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ void __ceph_do_pending_vmtruncate(struct inode *inode)
{
struct ceph_inode_info *ci = ceph_inode(inode);
u64 to;
int wrbuffer_refs, wake = 0;
int wrbuffer_refs, finish = 0;

retry:
spin_lock(&ci->i_ceph_lock);
Expand Down Expand Up @@ -1498,15 +1498,18 @@ void __ceph_do_pending_vmtruncate(struct inode *inode)
truncate_inode_pages(inode->i_mapping, to);

spin_lock(&ci->i_ceph_lock);
ci->i_truncate_pending--;
if (ci->i_truncate_pending == 0)
wake = 1;
if (to == ci->i_truncate_size) {
ci->i_truncate_pending = 0;
finish = 1;
}
spin_unlock(&ci->i_ceph_lock);
if (!finish)
goto retry;

if (wrbuffer_refs == 0)
ceph_check_caps(ci, CHECK_CAPS_AUTHONLY, NULL);
if (wake)
wake_up_all(&ci->i_cap_wq);

wake_up_all(&ci->i_cap_wq);
}


Expand Down

0 comments on commit da012cf

Please sign in to comment.