Commit 43b93121 authored by chiminghao's avatar chiminghao Committed by Linus Torvalds

mm/truncate.c: remove unneeded variable

Return value directly instead of taking this in another redundant
variable.

Link: https://lkml.kernel.org/r/20211207083222.401594-1-chi.minghao@zte.com.cnSigned-off-by: default avatarchiminghao <chi.minghao@zte.com.cn>
Reported-by: default avatarZeal Robot <zealci@zte.com.cm>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Reviewed-by: default avatarPankaj Gupta <pankaj.gupta@ionos.com>
Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 23647618
...@@ -205,7 +205,6 @@ static void truncate_cleanup_page(struct page *page) ...@@ -205,7 +205,6 @@ static void truncate_cleanup_page(struct page *page)
static int static int
invalidate_complete_page(struct address_space *mapping, struct page *page) invalidate_complete_page(struct address_space *mapping, struct page *page)
{ {
int ret;
if (page->mapping != mapping) if (page->mapping != mapping)
return 0; return 0;
...@@ -213,9 +212,7 @@ invalidate_complete_page(struct address_space *mapping, struct page *page) ...@@ -213,9 +212,7 @@ invalidate_complete_page(struct address_space *mapping, struct page *page)
if (page_has_private(page) && !try_to_release_page(page, 0)) if (page_has_private(page) && !try_to_release_page(page, 0))
return 0; return 0;
ret = remove_mapping(mapping, page); return remove_mapping(mapping, page);
return ret;
} }
int truncate_inode_page(struct address_space *mapping, struct page *page) int truncate_inode_page(struct address_space *mapping, struct page *page)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment