Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbd646a8 authored by Yehuda Sadeh's avatar Yehuda Sadeh Committed by Sage Weil
Browse files

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: default avatarYehuda Sadeh <yehuda@hq.newdream.net>
parent 169e16ce
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -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)
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;
}
}