Re: [PATCH] ntfs3: initialize err in attr_wof_frame_info
From: Konstantin Komarov
Date: Thu Jul 23 2026 - 10:32:57 EST
On 6/17/26 20:22, Ruoyu Wang wrote:
attr_wof_frame_info() may reuse a cached offsets folio. In that case theHello,
loop can fill the output offsets without calling attr_load_runs_range()
or ntfs_read_run(), leaving err uninitialized before the common return
path. Initialize err to 0 for the successful cached path.
Signed-off-by: Ruoyu Wang <ruoyuw560@xxxxxxxxx>
---
fs/ntfs3/attrib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c
index e61c5bf7e27e4..c654b3cc1e91f 100644
--- a/fs/ntfs3/attrib.c
+++ b/fs/ntfs3/attrib.c
@@ -1516,7 +1516,7 @@ int attr_wof_frame_info(struct ntfs_inode *ni, struct ATTRIB *attr,
u8 bytes_per_off;
char *addr;
struct folio *folio;
- int i, err;
+ int i, err = 0;
__le32 *off32;
__le64 *off64;
--
2.51.0
Sorry for the delay.
The patch was applied, thank you.
Regards,
Konstantin