mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 02:05:33 +00:00
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>
This commit is contained in:
parent
169e16ce81
commit
dbd646a851
@ -448,8 +448,13 @@ out:
|
|||||||
|
|
||||||
static int ceph_writepage(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);
|
unlock_page(page);
|
||||||
|
iput(inode);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user