forked from Minki/linux
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 <mcgrof@kernel.org> Signed-off-by: Ming Lei <ming.lei@redhat.com> Acked-by: Minchan Kim <minchan@kernel.org> Link: https://lore.kernel.org/r/20211025025426.2815424-5-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
5a4b653655
commit
00c5495c54
@ -1790,7 +1790,7 @@ static ssize_t reset_store(struct device *dev,
|
||||
mutex_unlock(&bdev->bd_disk->open_mutex);
|
||||
|
||||
/* Make sure all the pending I/O are finished */
|
||||
fsync_bdev(bdev);
|
||||
sync_blockdev(bdev);
|
||||
zram_reset_device(zram);
|
||||
|
||||
mutex_lock(&bdev->bd_disk->open_mutex);
|
||||
@ -1995,7 +1995,7 @@ static int zram_remove(struct zram *zram)
|
||||
;
|
||||
} else {
|
||||
/* Make sure all the pending I/O are finished */
|
||||
fsync_bdev(bdev);
|
||||
sync_blockdev(bdev);
|
||||
zram_reset_device(zram);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user