40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From 80326bcb7fa8638fd14ce8900a30e59b9c9dc2f4 Mon Sep 17 00:00:00 2001
|
|
From: Zdenek Kabelac <zkabelac@redhat.com>
|
|
Date: Fri, 3 Apr 2026 13:32:46 +0200
|
|
Subject: [PATCH 095/211] filesystem: fix nofs early-return checking wrong
|
|
struct
|
|
|
|
fs_get_info() checked fsi->nofs (caller's zeroed output parameter)
|
|
instead of info.nofs (the local struct populated by fs_get_blkid).
|
|
The early-return for no-filesystem case never triggered, causing
|
|
unnecessary crypto_LUKS, mount, and resize checks.
|
|
|
|
Result was still correct because *fsi = info copy at line 342
|
|
propagated nofs to the caller, but the early exit was dead code.
|
|
|
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
(cherry picked from commit 3606b9749042fb02117bebb0ba84f4e95ebeef57)
|
|
---
|
|
lib/device/filesystem.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/device/filesystem.c b/lib/device/filesystem.c
|
|
index adb8f0174..87f97130d 100644
|
|
--- a/lib/device/filesystem.c
|
|
+++ b/lib/device/filesystem.c
|
|
@@ -284,8 +284,10 @@ int fs_get_info(struct cmd_context *cmd, struct logical_volume *lv, struct fs_in
|
|
return 0;
|
|
}
|
|
|
|
- if (fsi->nofs)
|
|
+ if (info.nofs) {
|
|
+ fsi->nofs = 1;
|
|
return 1;
|
|
+ }
|
|
|
|
/*
|
|
* If there's a LUKS dm-crypt layer over the LV, then
|
|
--
|
|
2.54.0
|
|
|