ceph: cleanup async writeback, truncation, invalidate helpers

Grab inode ref in helper.  Make work functions static, with consistent
naming.

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil
2010-02-09 15:24:44 -08:00
parent 6a026589ba
commit 3c6f6b79a6
4 changed files with 65 additions and 43 deletions

View File

@ -947,8 +947,7 @@ retry_locked:
*/
snapc = ceph_get_snap_context((void *)page->private);
unlock_page(page);
if (ceph_queue_writeback(inode))
igrab(inode);
ceph_queue_writeback(inode);
wait_event_interruptible(ci->i_cap_wq,
context_is_writeable_or_written(inode, snapc));
ceph_put_snap_context(snapc);