Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189211
b: refs/heads/master
c: 8f883c2
h: refs/heads/master
i:
  189209: 6ed25c1
  189207: 128de61
v: v3
  • Loading branch information
Sage Weil committed Mar 23, 2010
1 parent 169c17e commit e5efe53
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: ec4318bcb4c59d8b8bf7037c9f444a9887ccb265
refs/heads/master: 8f883c24de33ba929c95e018ac0ba66e4f46734b
10 changes: 8 additions & 2 deletions trunk/fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,10 @@ static int context_is_writeable_or_written(struct inode *inode,
/*
* We are only allowed to write into/dirty the page if the page is
* clean, or already dirty within the same snap context.
*
* called with page locked.
* return success with page locked,
* or any failure (incl -EAGAIN) with page unlocked.
*/
static int ceph_update_writeable_page(struct file *file,
loff_t pos, unsigned len,
Expand Down Expand Up @@ -961,9 +965,11 @@ static int ceph_update_writeable_page(struct file *file,
snapc = ceph_get_snap_context((void *)page->private);
unlock_page(page);
ceph_queue_writeback(inode);
wait_event_interruptible(ci->i_cap_wq,
r = wait_event_interruptible(ci->i_cap_wq,
context_is_writeable_or_written(inode, snapc));
ceph_put_snap_context(snapc);
if (r == -ERESTARTSYS)
return r;
return -EAGAIN;
}

Expand Down Expand Up @@ -1035,7 +1041,7 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping,
int r;

do {
/* get a page*/
/* get a page */
page = grab_cache_page_write_begin(mapping, index, 0);
if (!page)
return -ENOMEM;
Expand Down

0 comments on commit e5efe53

Please sign in to comment.