提交 dbd646a8 编写于 作者: Y Yehuda Sadeh 提交者: Sage Weil

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: NYehuda Sadeh <yehuda@hq.newdream.net>
上级 169e16ce
......@@ -448,8 +448,13 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
static int ceph_writepage(struct page *page, struct writeback_control *wbc)
{
int err = writepage_nounlock(page, wbc);
int err;
struct inode *inode = page->mapping->host;
BUG_ON(!inode);
igrab(inode);
err = writepage_nounlock(page, wbc);
unlock_page(page);
iput(inode);
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册