Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1203004pxf; Fri, 19 Mar 2021 01:15:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSBLF+YsTparv0uq7mRiffsOTyx7QaurivL+fiRvLdzDWWBqaAnPz1X8CU2v/MiU2JsgqT X-Received: by 2002:a50:eb97:: with SMTP id y23mr8221617edr.170.1616141728157; Fri, 19 Mar 2021 01:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616141728; cv=none; d=google.com; s=arc-20160816; b=MGYnJ6E36KxBUFP3++CKPhKAXD/yReTwEfbBSqzR0xr/vmbQEb3cimtzXGYAMzST0n qkvaBEdNP6UKUcRkDfYMQFTKPWYs1wfjaUeKgIj2ZMssagSUHyikwbhJ1+oKXk6sKVUk IOHonMcNb2ADRpsdJbAQWkUD26YKbAsbNnoBGGrgyLnSisdKLuVUfrcBdt3INIk+nobR ldLcdY+/PAGzyIVFRkl4hcH8rZ8rZaNWgdM9qAkTEH8pGLFZrmwjc2n9PPG/f6Ydf6oB e5eqxGPDOf+jexJmvcsTA6RA1UxqtIjAd+HlsluiLlRzgRrlbh6EIiZakMcKcOrkm4tY 08dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=eLy+fnXF+sDWEdbERSF1yBL26yzw/Q2HkJDHrTIicxg=; b=w24a70f5X1Mou1TpRfvbmMbrNeL4vyKsHYpKb3FIlXEkoilOtW9J6wIeC5umXZd747 lLNgICQ6Bcbmya9dgmc6BZMvfzVWZbI2A7fJP+xywrUp8khvzqN1+p205p2f798Mlwwh ZwUHjVyjREs8Apcbnp/ny3ViLRqlbToXse//kWFRAr1l4QiPHAry6JVhq76FyjlUgEXj v888ITlfFpl1xvp9xFK8ecJwSdcd1HnxdQGry3YsW94DuoenHk2eNcx/MndO14o8qdDK Tf2dul1raeVqTlhkSIfM7EytqzA26w01Xyf686BjvGyXOmYka3C9WCDLANeKhqIDT1Bl Unag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t5si3780697edd.272.2021.03.19.01.15.05; Fri, 19 Mar 2021 01:15:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234251AbhCSIL5 (ORCPT + 99 others); Fri, 19 Mar 2021 04:11:57 -0400 Received: from smtp21.cstnet.cn ([159.226.251.21]:48930 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234215AbhCSILn (ORCPT ); Fri, 19 Mar 2021 04:11:43 -0400 Received: from localhost.localdomain (unknown [124.16.141.241]) by APP-01 (Coremail) with SMTP id qwCowABnqI2jXFRgdxUYAA--.9656S2; Fri, 19 Mar 2021 16:11:16 +0800 (CST) From: Xu Wang To: agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH] dm thin: remove needless request_queue NULL pointer check Date: Fri, 19 Mar 2021 08:11:13 +0000 Message-Id: <20210319081113.16916-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: qwCowABnqI2jXFRgdxUYAA--.9656S2 X-Coremail-Antispam: 1UD129KBjvdXoW7JFy5XF18Xr1furykGrW7Jwb_yoW3AwcEgw 15ZF9Fqrn5Gr13uw15JF45Z3sYyFn5WF1IqFyIga9Iv348ua13AryUurn5Wr45u3y8CrZr Ar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Since commit ff9ea323816d ("block, bdi: an active gendisk always has a request_queue associated with it") the request_queue pointer returned from bdev_get_queue() shall never be NULL. Signed-off-by: Xu Wang --- drivers/md/dm-thin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index fff4c50df74d..985baee3a678 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -2816,7 +2816,7 @@ static bool data_dev_supports_discard(struct pool_c *pt) { struct request_queue *q = bdev_get_queue(pt->data_dev->bdev); - return q && blk_queue_discard(q); + return blk_queue_discard(q); } static bool is_factor(sector_t block_size, uint32_t n) -- 2.17.1