linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] mm/page_io.c: remove an unnecessary goto in generic_swapfile_activate()
@ 2020-05-08 12:06 Zhen Lei
  2020-05-08 12:06 ` [PATCH v2 1/1] " Zhen Lei
  0 siblings, 1 reply; 2+ messages in thread
From: Zhen Lei @ 2020-05-08 12:06 UTC (permalink / raw)
  To: David Hildenbrand, Andrew Morton, linux-mm, linux-kernel; +Cc: Zhen Lei

v1 --> v2:
1. rename subject
2. give up adding an newline to seperate two labels

Zhen Lei (1):
  mm/page_io.c: remove an unnecessary goto in
    generic_swapfile_activate()

 mm/page_io.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.26.0.106.g9fadedd




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH v2 1/1] mm/page_io.c: remove an unnecessary goto in generic_swapfile_activate()
  2020-05-08 12:06 [PATCH v2 0/1] mm/page_io.c: remove an unnecessary goto in generic_swapfile_activate() Zhen Lei
@ 2020-05-08 12:06 ` Zhen Lei
  0 siblings, 0 replies; 2+ messages in thread
From: Zhen Lei @ 2020-05-08 12:06 UTC (permalink / raw)
  To: David Hildenbrand, Andrew Morton, linux-mm, linux-kernel; +Cc: Zhen Lei

This "goto" doesn't reduce any code, but bother the readers.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
---
 mm/page_io.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/page_io.c b/mm/page_io.c
index 76965be1d40e..19d429abb2cc 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -237,8 +237,7 @@ int generic_swapfile_activate(struct swap_info_struct *sis,
 	return ret;
 bad_bmap:
 	pr_err("swapon: swapfile has holes\n");
-	ret = -EINVAL;
-	goto out;
+	return -EINVAL;
 }
 
 /*
-- 
2.26.0.106.g9fadedd




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-08 12:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 12:06 [PATCH v2 0/1] mm/page_io.c: remove an unnecessary goto in generic_swapfile_activate() Zhen Lei
2020-05-08 12:06 ` [PATCH v2 1/1] " Zhen Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).