Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp518735pxk; Wed, 2 Sep 2020 07:50:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFfzu+58C+8IKneK4/KroFlp5n96cPyrlNgCRK1ge97eDqWG+EPvPo5OMda1iqTfpdv7qh X-Received: by 2002:a17:906:4754:: with SMTP id j20mr351633ejs.293.1599058206045; Wed, 02 Sep 2020 07:50:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599058206; cv=none; d=google.com; s=arc-20160816; b=WG7ekoGgbqqlJ7H5M+lRHZ6FpFSnbBCcB3JfY1RvOMg/OUlbulMmTrIXEdS4bReA2o 5cv4Bx/C0m7DyB08bv63R84cvdL66DAW4/Vhs1Ie1DhpARddOK9y93FESlWwmm+NgHAl jD1Fz2C7ewqFmgS6BVw85kYPyqTme+RYNhBeyZRxgaIACW+fFolzg10AzElIdo4+fmSF Z1IMVUmvTVPpnJXoFuSKw2zlrS99YdmpNuZLPoKLTg791HumedBbw5DNFM18dxcdjP3I HY/onMKekerg/9ZLVCiSiMA8Cen7bftfoV/uUBgmpsodyr/3TnVC0zHaDTvAETeejpTA Ckdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/qlsu7oTYC7Ky6k7tpiA+p9AylNGHSY5Bb3wPIG2HJ8=; b=NDiSm2FEJtF1ZpXyebQzJFMHSWzhEXHpN8qzw/LwEPvRWXDryKe4dMHrs1ZS0RzQLL VF2y/buX9dzK1Csk3gxDdQCu433cHaAJqhfD6vyArZfHWqW9RNyyXXl39ll+hx+eaFvL 0YyBV+cPGF4SDSUZGYL6It9/UNa9bIHEZLEcWTlw3NFctd5Q0htwM/0WWBcT0ARSO82o iZ5rb/johS2FNR9rpY6Jr1++aGJVCQys8dKnOJbv57fPnazf8OFHmUw9wSMSDn8XczIu R7IyEGa0xqUuo1Fvhvn78luj+EWRLvtLkMfCZLBmP1EqEhBTJhrACl7L8vHlAODvxzv0 kqIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=jUHxx6hF; 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 f10si2635138edy.472.2020.09.02.07.49.41; Wed, 02 Sep 2020 07:50:06 -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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=jUHxx6hF; 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 S1728238AbgIBOrr (ORCPT + 99 others); Wed, 2 Sep 2020 10:47:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727964AbgIBOMy (ORCPT ); Wed, 2 Sep 2020 10:12:54 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67061C061246; Wed, 2 Sep 2020 07:12:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=/qlsu7oTYC7Ky6k7tpiA+p9AylNGHSY5Bb3wPIG2HJ8=; b=jUHxx6hFjNMotTFc/lUHdZ1Rb1 CJ6ceuzZrzKwofuy3YT4uCfSV3Q4H9Bq5trKK1iWmIfdaXVBWWAsX+M7OhcnoE9qVUhfEQb6QJNeH fzPpgq7wd5olWprO3ne7uDvVx7r/A7lfXDpsvIbmHSyD654S8GXX3r7iTNqq/zIG5ucfrirnJQxpR m8axEnPM98Y99y/iX56LgNH9oD2ubfbKM9bXDZfrX7fbF1Gp0/ofQgc/MJUtsrHDrSlhJxkTy8Hho mFgi/F4rQW+Ztn9WjBXWvR8OBmXlpx7vAmYZmQPweS/7FdkR66BvQ6uUva1M1n7DCM+sDVXtuo5Da L7a+VXIA==; Received: from [2001:4bb8:184:af1:6a63:7fdb:a80e:3b0b] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDTV0-0005di-My; Wed, 02 Sep 2020 14:12:30 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Denis Efremov , Tim Waugh , Michal Simek , Borislav Petkov , "David S. Miller" , Song Liu , "Martin K. Petersen" , Finn Thain , Michael Schmitz , linux-m68k@lists.linux-m68k.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-raid@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 08/19] xsysace: use bdev_check_media_change Date: Wed, 2 Sep 2020 16:12:07 +0200 Message-Id: <20200902141218.212614-9-hch@lst.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200902141218.212614-1-hch@lst.de> References: <20200902141218.212614-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch to use bdev_check_media_change instead of check_disk_change and call ace_revalidate_disk manually. Given that ace_revalidate_disk only deals with media change events, the extra call into ->revalidate_disk from bdev_disk_changed is not required either, so stop wiring up the method. Signed-off-by: Christoph Hellwig --- drivers/block/xsysace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index 5d8e0ab3f054f5..eefe542f2d9fff 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c @@ -922,7 +922,8 @@ static int ace_open(struct block_device *bdev, fmode_t mode) ace->users++; spin_unlock_irqrestore(&ace->lock, flags); - check_disk_change(bdev); + if (bdev_check_media_change(bdev)) + ace_revalidate_disk(bdev->bd_disk); mutex_unlock(&xsysace_mutex); return 0; @@ -966,7 +967,6 @@ static const struct block_device_operations ace_fops = { .open = ace_open, .release = ace_release, .check_events = ace_check_events, - .revalidate_disk = ace_revalidate_disk, .getgeo = ace_getgeo, }; -- 2.28.0