On Tue, Oct 24, 2023 at 03:01:09PM +0200, Christian Brauner wrote: > 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. > > Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> Yessss less EIO munching in the VFS layer! Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> --D > --- > block/bdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/bdev.c b/block/bdev.c > index d674ad381c52..a3e2af580a73 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; > > -- > 2.34.1 >