Skip to content

Commit 00c5495

Browse files
Ming Leiaxboe
authored andcommitted
zram: replace fsync_bdev with sync_blockdev
When calling fsync_bdev(), zram driver guarantees that the bdev won't be opened by anyone, then there can't be one active fs/superblock over the zram bdev, so replace fsync_bdev with sync_blockdev. Reviewed-by: Luis Chamberlain <[email protected]> Signed-off-by: Ming Lei <[email protected]> Acked-by: Minchan Kim <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 5a4b653 commit 00c5495

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/block/zram/zram_drv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ static ssize_t reset_store(struct device *dev,
17901790
mutex_unlock(&bdev->bd_disk->open_mutex);
17911791

17921792
/* Make sure all the pending I/O are finished */
1793-
fsync_bdev(bdev);
1793+
sync_blockdev(bdev);
17941794
zram_reset_device(zram);
17951795

17961796
mutex_lock(&bdev->bd_disk->open_mutex);
@@ -1995,7 +1995,7 @@ static int zram_remove(struct zram *zram)
19951995
;
19961996
} else {
19971997
/* Make sure all the pending I/O are finished */
1998-
fsync_bdev(bdev);
1998+
sync_blockdev(bdev);
19991999
zram_reset_device(zram);
20002000
}
20012001

0 commit comments

Comments
 (0)