From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78E59C2D0A3 for ; Tue, 3 Nov 2020 10:07:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2A8021D91 for ; Tue, 3 Nov 2020 10:07:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="B2kFDCQ/"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="tCS6bAGl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2A8021D91 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rqcLLQJLl9ID7qRMBDntLuPDNwOiV8KqRhifnB+BLH8=; b=B2kFDCQ/GvInXTpUDnbxxNJkR RtjiNGjCfUc+GzSEkz4DSyT0P4O486ChZKUh6xxezHBZyWbiQzj+Kyi6yMiPvAw6214DWeV6B+HJO ANGm1tHp9XzAwEW97SXFHDMaK8rT9rN1OGo7igWAX2uq2uyC5R3Uymg9F023Kh7QQbkwl6lLsldVn fGP3zBZm1ZM13Y6B6ZMjzzuHfcpjUVjuCzbQGk81djXHUOgf+yIylaRUic+K8EicZMRxYpNBOZBoQ 4eL0hEl8SgzaFXV/kaMHjUMxsEQk7/NgHM9hMmkTWXiWT2hY8HDW4cED4/MIKVeaX9v2t/rwnQvnT tnLRRowiw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZtDO-00049R-C7; Tue, 03 Nov 2020 10:06:58 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZtDK-000490-F7 for linux-mtd@merlin.infradead.org; Tue, 03 Nov 2020 10:06:56 +0000 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=i7wqZZpXCL5ORZNGUa3zoAoYso4IoJJ/DeaKvkfVUtI=; b=tCS6bAGllZPJdXICZFJzRDE8P7 S/mHuEnABdA65SmkJblCu1ugMqDXnOf2cfEIQWnp0W82NZdkZHxR9qQSs0kPgyepufB0elGqTMHO7 6Cw7sMajjx6y2dyD6+gfflMK7HncupbkudXO9WZU0J9Gu3cgWexvBZ8ZGpzV9b64ZPObhmsxfqcNc 8mEryycCUva/FkZUuIxD/5JChl7o3KyngNa1Tr/Dmxk53TyHgs6nFUpen7n8Ztsizq7W7qbb7n2v+ 0IXGVLSzDkGk+LEbHyPtQ6HU9AsSRDn2VWyZwJXc7A+o1WxPHSRNh3BAkqXBAePujgWblAFKoTzzO KwQjGucA==; Received: from 089144208145.atnat0017.highway.a1.net ([89.144.208.145] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZtDJ-0000Ms-0z; Tue, 03 Nov 2020 10:06:53 +0000 From: Christoph Hellwig To: Jens Axboe Subject: [PATCH 02/10] block: don't call into the driver for BLKFLSBUF Date: Tue, 3 Nov 2020 11:00:10 +0100 Message-Id: <20201103100018.683694-3-hch@lst.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201103100018.683694-1-hch@lst.de> References: <20201103100018.683694-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-raid@vger.kernel.org, Jan Hoeppner , Vignesh Raghavendra , linux-s390@vger.kernel.org, Richard Weinberger , linux-block@vger.kernel.org, Song Liu , linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, Stefan Haberland , Miquel Raynal , Ilya Dryomov , ceph-devel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org BLKFLSBUF is entirely contained in the block core, and there is no good reason to give the driver a hook into processing it. Signed-off-by: Christoph Hellwig --- block/ioctl.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/block/ioctl.c b/block/ioctl.c index 3fbc382eb926d4..c6d8863f040945 100644 --- a/block/ioctl.c +++ b/block/ioctl.c @@ -369,15 +369,8 @@ static inline int is_unrecognized_ioctl(int ret) static int blkdev_flushbuf(struct block_device *bdev, fmode_t mode, unsigned cmd, unsigned long arg) { - int ret; - if (!capable(CAP_SYS_ADMIN)) return -EACCES; - - ret = __blkdev_driver_ioctl(bdev, mode, cmd, arg); - if (!is_unrecognized_ioctl(ret)) - return ret; - fsync_bdev(bdev); invalidate_bdev(bdev); return 0; -- 2.28.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/