[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210917082111.33923-1-vulab@iscas.ac.cn>
Date: Fri, 17 Sep 2021 08:21:11 +0000
From: Xu Wang <vulab@...as.ac.cn>
To: akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: [PATCH] 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.
Signed-off-by: Xu Wang <vulab@...as.ac.cn>
---
mm/swapfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 22d10f713848..42027d213fd2 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -3118,7 +3118,7 @@ static bool swap_discardable(struct swap_info_struct *si)
{
struct request_queue *q = bdev_get_queue(si->bdev);
- if (!q || !blk_queue_discard(q))
+ if (!blk_queue_discard(q))
return false;
return true;
--
2.17.1
Powered by blists - more mailing lists