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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CACCEC67871 for ; Mon, 9 Jan 2023 05:18:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 35B3F8E0002; Mon, 9 Jan 2023 00:18:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 181488E0007; Mon, 9 Jan 2023 00:18:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CCB4A8E0006; Mon, 9 Jan 2023 00:18:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 933038E0003 for ; Mon, 9 Jan 2023 00:18:22 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 6A6E916028F for ; Mon, 9 Jan 2023 05:18:22 +0000 (UTC) X-FDA: 80334104844.06.90EF519 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf23.hostedemail.com (Postfix) with ESMTP id 75A5514000F for ; Mon, 9 Jan 2023 05:18:20 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=aRa6C07m; spf=none (imf23.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673241501; a=rsa-sha256; cv=none; b=gsxMSrdCNftg8bwcUO+Gexe7NZxJE9ce3fi3reB9TAsJOUiAeeZknC4YEXI2DvnU2PBwOi WdNVeQlUvl2i4h+E7kKYiZLhOiDeMZk19vXTAUcCt1HcAdnTzWJvvumh6/sD1d5wXGf9Tl g9voKX6e8falbPYoiMUb6vsmd/Pdtgs= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=aRa6C07m; spf=none (imf23.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673241501; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=vQF/XULxVm6847KaRqQbhdaohxHXi2nEuadxTiR1ZyE=; b=tULINnYCqMyQI52121TPPYNz8iepI9qIww6I7LBvP597u+3rKItJ6HNUKmfVa0QYqUDRgy cBkrrHpcd/cNBNR9kUkcCGEW6Er/kfMNdkBDc1tr+3oJ/merTu3yQEyNQPfnBwMff3i22D +f26lBqA68/hoI3vwJ5LPbDlO75LjFY= 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=vQF/XULxVm6847KaRqQbhdaohxHXi2nEuadxTiR1ZyE=; b=aRa6C07mcL3ngPuqUeUeiq9Ewx ojEY5TSS9TePzq8VcMu5ajWtwn4NiV+m5NNngSAtK9zTzdDs3q90VzpUCMIrSyZGbu7kEiTeRh619 6q3IWbwiybuoZMlQU/vqIim43gIyzhp3Ph8+GVUVj/vWGpTU/+Vxfh6YkJL/frk+TJxlOamIQqcWt IzYn4QhNA4rFF0qJuAkxUWsHMRoGHusUQ/kdpMG6Wvwysl2pFmTgzmP41oczAMhe2Rntw6fQfNV5C y5mvfiSAJm2MwpIQYvhXFRsv37zIzK32GV2QCdxDA5nlXXnWl94CSidw9tcoy3HcxKd6KOir4+OTQ wQw0SzcQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEkYE-0020xc-8n; Mon, 09 Jan 2023 05:18:26 +0000 From: "Matthew Wilcox (Oracle)" To: Cc: "Matthew Wilcox (Oracle)" , Jeff Layton , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Hellwig Subject: [PATCH 11/11] mm: Remove filemap_fdatawait_keep_errors() Date: Mon, 9 Jan 2023 05:18:23 +0000 Message-Id: <20230109051823.480289-12-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230109051823.480289-1-willy@infradead.org> References: <20230109051823.480289-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Queue-Id: 75A5514000F X-Rspamd-Server: rspam01 X-Stat-Signature: 1h38twfwueiff3mcru9j59y8ag6fpfgs X-HE-Tag: 1673241500-545109 X-HE-Meta: U2FsdGVkX1/Fh+eLBQmuK8hyZfhi2dLYYyiLnW3n+yZmxW60depzA1HnnGU7z4auHs6jsRRKPhGDUeoWWKZgciKnA9hX/CNWpYqDGet2U8o1P18hZWTKTvZMiPw+xnVRrXPFEmpzVO3BL+qS8wOk5z7OiPbgtv6CvIjDmdL9eG4iAY66zlVppMAsHyOdvfhqUGgzFGgZCOSlMARr/UW6A7yWP0n7PY5kLtPfJ8UcrgTZWct4bCQF/a5kCGQ0EkHvwCacUkEpJQG1wAT3kwVVxrkCgEm/f2b78QDx3L7wYfAsIkrpjAqUYun+gvOPmb0TuB4p7cKo6nbsq9yFG47ee8EQH2B1FscDfcbnrCfkiarp8axot+RXo4Sh0bsiPrpcosF4NryUpWZmw4Rzj52z8ooo5XYEUAPv6YsCBs3Sooe9rHJB5fBJuONg6mDa1a4W+PydOjztVPqfx0o3K3BLW+OLOwFfWEWrXA/0vYO9KZ0KnzwEbHabR6vbDPxCA6WdEYkalphyWvmv1Xmxb3jdBKs90JBXBLIRI12TOLwQARRfcqNvtcIP33yxakbL+YPrYjgb5LylqIWetiyj372vHXz33Gal9R1IYw3jK2llFj9pjYVPt3gNeZcX4+4fMeMqPVnHh+XPQGDGg2ryqh4dyM3nkmVCwMkshKvUrfmqfmZcu0KJfw/r7OgOaRc7MpGRBRms3urV6S5Fjry4cP9bQmPFkmp9VtcGe7cic+ljnEjB54XXkjL/xn/o9zeuLvaoEUsEwkGak5qNpMLKMmza9p6JJMS0/HvI3jFNB1nZEFCcQd4v+3ZYuBORtji+8rdHO3772vrILUdRdKVX3fJM8jHBDl5ZlL/aoQv8ntcTI7os7CvEPCoErcTK07rcQQPC/oa9KWqpYv/JFnrEYO3xHo22YEsH4babVywU4TVt5UKDFGQYOC+Wlw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This function is now the same as filemap_fdatawait(), so change all callers to use that instead. Remove the comments which talk about keeping the errors around for other callers as this is now the only behaviour. Signed-off-by: Matthew Wilcox (Oracle) --- block/bdev.c | 8 +------- fs/fs-writeback.c | 7 +------ fs/xfs/scrub/bmap.c | 2 +- include/linux/pagemap.h | 2 -- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/block/bdev.c b/block/bdev.c index edc110d90df4..2fae19f0a5c2 100644 --- a/block/bdev.c +++ b/block/bdev.c @@ -1053,13 +1053,7 @@ void sync_bdevs(bool wait) if (!atomic_read(&bdev->bd_openers)) { ; /* skip */ } else if (wait) { - /* - * We keep the error status of individual mapping so - * that applications can catch the writeback error using - * fsync(2). See filemap_fdatawait_keep_errors() for - * details. - */ - filemap_fdatawait_keep_errors(inode->i_mapping); + filemap_fdatawait(inode->i_mapping); } else { filemap_fdatawrite(inode->i_mapping); } diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 6fba5a52127b..dc0158125e5d 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -2598,12 +2598,7 @@ static void wait_sb_inodes(struct super_block *sb) spin_unlock(&inode->i_lock); rcu_read_unlock(); - /* - * We keep the error status of individual mapping so that - * applications can catch the writeback error using fsync(2). - * See filemap_fdatawait_keep_errors() for details. - */ - filemap_fdatawait_keep_errors(mapping); + filemap_fdatawait(mapping); cond_resched(); diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c index d50d0eab196a..8f169047d410 100644 --- a/fs/xfs/scrub/bmap.c +++ b/fs/xfs/scrub/bmap.c @@ -64,7 +64,7 @@ xchk_setup_inode_bmap( */ error = filemap_fdatawrite(mapping); if (!error) - error = filemap_fdatawait_keep_errors(mapping); + error = filemap_fdatawait(mapping); if (error && (error != -ENOSPC && error != -EIO)) goto out; } diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 7fe2a5ec1c12..69190335deb1 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -40,8 +40,6 @@ static inline int filemap_fdatawait(struct address_space *mapping) return filemap_fdatawait_range(mapping, 0, LLONG_MAX); } -#define filemap_fdatawait_keep_errors(mapping) filemap_fdatawait(mapping) - bool filemap_range_has_page(struct address_space *, loff_t lstart, loff_t lend); int filemap_write_and_wait_range(struct address_space *mapping, loff_t lstart, loff_t lend); -- 2.35.1