提交 6c474f7b 编写于 作者: M Maxim 提交者: Steven Whitehouse

GFS2: Adding missing unlock_page()

gfs2_write_begin() calls grab_cache_page_write_begin() that returns *locked*
page. Correspondent error-handling path lacks for unlock_page() call:

> out:
> 	if (error == 0)
> 		return 0;
>
> 	page_cache_release(page);

The whole system hangs if gfs2_unstuff_dinode() called from gfs2_write_begin()
failed for some reason.
Reported-by: NMaxim <maxim.patlasov@gmail.com>
Signed-off-by: NMaxim <maxim.patlasov@gmail.com>
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 c618e87a
......@@ -695,6 +695,7 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping,
if (error == 0)
return 0;
unlock_page(page);
page_cache_release(page);
gfs2_trans_end(sdp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册