summaryrefslogtreecommitdiffstats
path: root/mm/truncate.c
diff options
context:
space:
mode:
authorchiminghao <chi.minghao@zte.com.cn>2022-01-14 14:05:10 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-15 16:30:26 +0200
commit43b93121056c524e2af77d561900ea856d32029c (patch)
tree1b2d61a2a0519a0a575b015ef4bd525ad7ca0a25 /mm/truncate.c
parent236476180c0f5d308fb313d5570d0b067307884c (diff)
downloadlinux-stable-43b93121056c524e2af77d561900ea856d32029c.tar.gz
linux-stable-43b93121056c524e2af77d561900ea856d32029c.tar.bz2
linux-stable-43b93121056c524e2af77d561900ea856d32029c.zip
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.cn Signed-off-by: chiminghao <chi.minghao@zte.com.cn> Reported-by: Zeal Robot <zealci@zte.com.cm> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/truncate.c')
-rw-r--r--mm/truncate.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/truncate.c b/mm/truncate.c
index cc83a3f7c1ad..41b8249b3b4a 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -205,7 +205,6 @@ static void truncate_cleanup_page(struct page *page)
static int
invalidate_complete_page(struct address_space *mapping, struct page *page)
{
- int ret;
if (page->mapping != mapping)
return 0;
@@ -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))
return 0;
- ret = remove_mapping(mapping, page);
-
- return ret;
+ return remove_mapping(mapping, page);
}
int truncate_inode_page(struct address_space *mapping, struct page *page)