Created
April 3, 2025 15:00
-
-
Save kraj/13c5f025609673c39c6570ca4b9e0807 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From f4d87a5dccf89926e69826e1b9bd7591f8a03c7d Mon Sep 17 00:00:00 2001 | |
From: Khem Raj <[email protected]> | |
Date: Mon, 31 Mar 2025 16:52:12 -0700 | |
Subject: [PATCH] tegra_virt_storage: Add check for | |
NV_BLOCK_DEVICE_OPERATIONS_OPEN_HAS_GENDISK_ARG | |
This matches the disk or device selections few lines above | |
Signed-off-by: Khem Raj <[email protected]> | |
--- | |
drivers/block/tegra_virt_storage/tegra_hv_vblk.c | 4 +++- | |
1 file changed, 3 insertions(+), 1 deletion(-) | |
diff --git a/drivers/block/tegra_virt_storage/tegra_hv_vblk.c b/drivers/block/tegra_virt_storage/tegra_hv_vblk.c | |
index aada66db..4a7f3273 100644 | |
--- a/drivers/block/tegra_virt_storage/tegra_hv_vblk.c | |
+++ b/drivers/block/tegra_virt_storage/tegra_hv_vblk.c | |
@@ -751,10 +751,12 @@ static int vblk_open(struct block_device *device, fmode_t mode) | |
spin_lock(&vblkdev->lock); | |
if (!vblkdev->users) { | |
-#if defined(NV_DISK_CHECK_MEDIA_CHANGE_PRESENT) /* Linux v6.5 */ | |
+#if defined(NV_DISK_CHECK_MEDIA_CHANGE_PRESENT) | |
+#if defined(NV_BLOCK_DEVICE_OPERATIONS_OPEN_HAS_GENDISK_ARG) /* Linux v6.5 */ | |
disk_check_media_change(disk); | |
#else | |
bdev_check_media_change(device); | |
+#endif | |
#endif | |
} | |
vblkdev->users++; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment