Skip to content

Commit

Permalink
logfs: check for the return value after calling find_or_create_page()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Younger Liu authored and torvalds committed Jan 24, 2014
1 parent a3b25d9 commit 2252b62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/logfs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2252b62

Please sign in to comment.