diff options
author | Christian Brauner <brauner@kernel.org> | 2023-10-24 16:01:09 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-11-18 16:59:23 +0300 |
commit | fbcb8f39e96d59f4ed48cbdfaa65211fa867985c (patch) | |
tree | 0b57f6b0289f9c9c6c7afa9a212542ceb5c948f4 | |
parent | 982c3b3058433f20aba9fb032599cee5dfc17328 (diff) | |
download | linux-fbcb8f39e96d59f4ed48cbdfaa65211fa867985c.tar.xz |
bdev: surface the error from sync_blockdev()
When freeze_super() is called, sync_filesystem() will be called which
calls sync_blockdev() and already surfaces any errors. Do the same for
block devices that aren't owned by a superblock and also for filesystems
that don't call sync_blockdev() internally but implicitly rely on
bdev_freeze() to do it.
Link: https://lore.kernel.org/r/20231024-vfs-super-freeze-v2-3-599c19f4faac@kernel.org
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r-- | block/bdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bdev.c b/block/bdev.c index a890da1b3adf..f27f1a7db2bd 100644 --- a/block/bdev.c +++ b/block/bdev.c @@ -245,7 +245,7 @@ int bdev_freeze(struct block_device *bdev) bdev->bd_fsfreeze_sb = sb; sync: - sync_blockdev(bdev); + error = sync_blockdev(bdev); done: mutex_unlock(&bdev->bd_fsfreeze_mutex); return error; |