diff options
author | Namhyung Kim <namhyung@gmail.com> | 2010-10-25 02:01:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-25 21:18:23 -0400 |
commit | 309f77ad9bea057d55b04580b5a711e9e3727e83 (patch) | |
tree | 7edf988602761b4ac46f9edc9a6d89c7abffd3cf /fs/buffer.c | |
parent | a3314a0ed389f51a51695120b429eccd45b3a165 (diff) |
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: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 74566c6f67b1..d895d9fd5b71 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -2458,11 +2458,10 @@ int nobh_write_begin(struct address_space *mapping, | |||
2458 | *fsdata = NULL; | 2458 | *fsdata = NULL; |
2459 | 2459 | ||
2460 | if (page_has_buffers(page)) { | 2460 | if (page_has_buffers(page)) { |
2461 | unlock_page(page); | 2461 | ret = __block_write_begin(page, pos, len, get_block); |
2462 | page_cache_release(page); | 2462 | if (unlikely(ret)) |
2463 | *pagep = NULL; | 2463 | goto out_release; |
2464 | return block_write_begin(mapping, pos, len, flags, pagep, | 2464 | return ret; |
2465 | get_block); | ||
2466 | } | 2465 | } |
2467 | 2466 | ||
2468 | if (PageMappedToDisk(page)) | 2467 | if (PageMappedToDisk(page)) |