diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2009-12-16 17:51:06 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-12-21 19:39:56 -0500 |
commit | dbd646a851713bec5bfff40ecf624b2e78518fe5 (patch) | |
tree | e5c4e141b7ec03ed5d2766a6909b1f48a5ec6519 /fs/ceph/addr.c | |
parent | 169e16ce816ca417286daf1db25de424a9d65a0c (diff) |
ceph: writepage grabs and releases inode
Fixes a deadlock that is triggered due to kswapd,
while the page was locked and the iput couldn't tear
down the address space.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r-- | fs/ceph/addr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index bf535815592d..d0cdceb0b90b 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -448,8 +448,13 @@ out: | |||
448 | 448 | ||
449 | static int ceph_writepage(struct page *page, struct writeback_control *wbc) | 449 | static int ceph_writepage(struct page *page, struct writeback_control *wbc) |
450 | { | 450 | { |
451 | int err = writepage_nounlock(page, wbc); | 451 | int err; |
452 | struct inode *inode = page->mapping->host; | ||
453 | BUG_ON(!inode); | ||
454 | igrab(inode); | ||
455 | err = writepage_nounlock(page, wbc); | ||
452 | unlock_page(page); | 456 | unlock_page(page); |
457 | iput(inode); | ||
453 | return err; | 458 | return err; |
454 | } | 459 | } |
455 | 460 | ||