All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>,
	"Josef Bacik" <josef@toxicpanda.com>,
	"David Sterba" <dsterba@suse.com>,
	"OGAWA Hirofumi" <hirofumi@mail.parknet.co.jp>,
	"Konstantin Komarov" <almaz.alexandrovich@paragon-software.com>,
	linux-block@vger.kernel.org, xen-devel@lists.xenproject.org,
	linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	ntfs3@lists.linux.dev
Subject: [PATCH 5/7] fat: use sync_blockdev_nowait
Date: Tue, 19 Oct 2021 08:25:28 +0200	[thread overview]
Message-ID: <20211019062530.2174626-6-hch@lst.de> (raw)
In-Reply-To: <20211019062530.2174626-1-hch@lst.de>

Use sync_blockdev_nowait instead of opencoding it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/fat/inode.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index de0c9b013a851..2fd5bfddb6958 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1943,10 +1943,8 @@ int fat_flush_inodes(struct super_block *sb, struct inode *i1, struct inode *i2)
 		ret = writeback_inode(i1);
 	if (!ret && i2)
 		ret = writeback_inode(i2);
-	if (!ret) {
-		struct address_space *mapping = sb->s_bdev->bd_inode->i_mapping;
-		ret = filemap_flush(mapping);
-	}
+	if (!ret)
+		ret = sync_blockdev_nowait(sb->s_bdev);
 	return ret;
 }
 EXPORT_SYMBOL_GPL(fat_flush_inodes);
-- 
2.30.2


  parent reply	other threads:[~2021-10-19  6:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19  6:25 cleanup block device inode syncing Christoph Hellwig
2021-10-19  6:25 ` [PATCH 1/7] fs: remove __sync_filesystem Christoph Hellwig
2021-10-19  6:33   ` Chaitanya Kulkarni
2021-10-19  6:25 ` [PATCH 2/7] block: remove __sync_blockdev Christoph Hellwig
2021-10-19  6:25 ` [PATCH 3/7] xen-blkback: use sync_blockdev Christoph Hellwig
2021-10-19  6:33   ` Chaitanya Kulkarni
2021-10-19  6:25 ` [PATCH 4/7] btrfs: " Christoph Hellwig
2021-10-19  6:34   ` Chaitanya Kulkarni
2021-10-19 13:54   ` David Sterba
2021-10-19  6:25 ` Christoph Hellwig [this message]
2021-10-19  6:34   ` [PATCH 5/7] fat: use sync_blockdev_nowait Chaitanya Kulkarni
2021-10-19  6:25 ` [PATCH 6/7] ntfs3: " Christoph Hellwig
2021-10-19  6:34   ` Chaitanya Kulkarni
2021-10-19  6:25 ` [PATCH 7/7] block: simplify the block device syncing code Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211019062530.2174626-6-hch@lst.de \
    --to=hch@lst.de \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=axboe@kernel.dk \
    --cc=dsterba@suse.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.