mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: Younger Liu <[email protected]> Cc: Younger Liu <[email protected]> Cc: Vyacheslav Dubeyko <[email protected]> Reviewed-by: Prasad Joshi <[email protected]> Cc: Jörn Engel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a3b25d9b77
commit
2252b62a56
1 changed files with 2 additions and 1 deletions
|
|
@ -62,7 +62,8 @@ 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);
|
||||
unlock_page(page);
|
||||
if (page)
|
||||
unlock_page(page);
|
||||
}
|
||||
return page;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue