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

Commit 2252b62a authored by Younger Liu's avatar Younger Liu Committed by Linus Torvalds
Browse files

logfs: check for the return value after calling find_or_create_page()

In get_mapping_page(), after calling find_or_create_page(), the return
value should be checked.

 This patch has been provided:
http://www.spinics.net/lists/linux-fsdevel/msg66948.html

 but not been
applied now.

Signed-off-by: default avatarYounger Liu <liuyiyang@hisense.com>
Cc: Younger Liu <younger.liucn@gmail.com>
Cc: Vyacheslav Dubeyko <slava@dubeyko.com>
Reviewed-by: default avatarPrasad Joshi <prasadjoshi.linux@gmail.com>
Cc: Jörn Engel <joern@logfs.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a3b25d9b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ static struct page *get_mapping_page(struct super_block *sb, pgoff_t index,
		page = read_cache_page(mapping, index, filler, sb);
	else {
		page = find_or_create_page(mapping, index, GFP_NOFS);
		if (page)
			unlock_page(page);
	}
	return page;