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

Commit 309f77ad authored by Namhyung Kim's avatar Namhyung Kim Committed by Al Viro
Browse files

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: default avatarNamhyung Kim <namhyung@gmail.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent a3314a0e
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -2458,11 +2458,10 @@ int nobh_write_begin(struct address_space *mapping,
	*fsdata = NULL;

	if (page_has_buffers(page)) {
		unlock_page(page);
		page_cache_release(page);
		*pagep = NULL;
		return block_write_begin(mapping, pos, len, flags, pagep,
					 get_block);
		ret = __block_write_begin(page, pos, len, get_block);
		if (unlikely(ret))
			goto out_release;
		return ret;
	}

	if (PageMappedToDisk(page))