mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Linux 6.6 compat: fsync_bdev() has been removed in favor of sync_blockdev()
In Linux commit 560e20e4bf6484a0c12f9f3c7a1aa55056948e1e, the
fsync_bdev() function was removed in favor of sync_blockdev() to do
(roughly) the same thing, given the same input. This change
conditionally attempts to call sync_blockdev() if fsync_bdev() isn't
discovered during configure.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Coleman Kane <ckane@colemankane.org>
Closes #15263
(cherry picked from commit 3f67e012e4)
This commit is contained in:
committed by
Tony Hutter
parent
b8bf99cca9
commit
e68922faaa
@@ -694,7 +694,13 @@ zvol_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
|
||||
switch (cmd) {
|
||||
case BLKFLSBUF:
|
||||
#ifdef HAVE_FSYNC_BDEV
|
||||
fsync_bdev(bdev);
|
||||
#elif defined(HAVE_SYNC_BLOCKDEV)
|
||||
sync_blockdev(bdev);
|
||||
#else
|
||||
#error "Neither fsync_bdev() nor sync_blockdev() found"
|
||||
#endif
|
||||
invalidate_bdev(bdev);
|
||||
rw_enter(&zv->zv_suspend_lock, RW_READER);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user