提交 309f77ad 编写于 作者: N Namhyung Kim 提交者: Al Viro

fs/buffer.c: call __block_write_begin() if we have page

If we have the appropriate page already, call __block_write_begin()
directly instead of releasing and regrabbing it inside of
block_write_begin().
Signed-off-by: NNamhyung Kim <namhyung@gmail.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 a3314a0e
...@@ -2458,11 +2458,10 @@ int nobh_write_begin(struct address_space *mapping, ...@@ -2458,11 +2458,10 @@ int nobh_write_begin(struct address_space *mapping,
*fsdata = NULL; *fsdata = NULL;
if (page_has_buffers(page)) { if (page_has_buffers(page)) {
unlock_page(page); ret = __block_write_begin(page, pos, len, get_block);
page_cache_release(page); if (unlikely(ret))
*pagep = NULL; goto out_release;
return block_write_begin(mapping, pos, len, flags, pagep, return ret;
get_block);
} }
if (PageMappedToDisk(page)) if (PageMappedToDisk(page))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册