mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + mm-swapfile-remove-needless-request_queue-null-pointer-check.patch added to -mm tree
@ 2021-09-19 23:24 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-09-19 23:24 UTC (permalink / raw)
  To: mm-commits, vulab


The patch titled
     Subject: mm/swapfile: remove needless request_queue NULL pointer check
has been added to the -mm tree.  Its filename is
     mm-swapfile-remove-needless-request_queue-null-pointer-check.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-swapfile-remove-needless-request_queue-null-pointer-check.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-swapfile-remove-needless-request_queue-null-pointer-check.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Xu Wang <vulab@iscas.ac.cn>
Subject: mm/swapfile: remove needless request_queue NULL pointer check

The request_queue pointer returned from bdev_get_queue() shall never be
NULL, so the null check is unnecessary, just remove it.

Link: https://lkml.kernel.org/r/20210917082111.33923-1-vulab@iscas.ac.cn
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/swapfile.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/swapfile.c~mm-swapfile-remove-needless-request_queue-null-pointer-check
+++ a/mm/swapfile.c
@@ -3118,7 +3118,7 @@ static bool swap_discardable(struct swap
 {
 	struct request_queue *q = bdev_get_queue(si->bdev);
 
-	if (!q || !blk_queue_discard(q))
+	if (!blk_queue_discard(q))
 		return false;
 
 	return true;
_

Patches currently in -mm which might be from vulab@iscas.ac.cn are

mm-swapfile-remove-needless-request_queue-null-pointer-check.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-19 23:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-19 23:24 + mm-swapfile-remove-needless-request_queue-null-pointer-check.patch added to -mm tree akpm

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).