]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ntfs: fix incorrect size of symbolic link
authorHyunchul Lee <hyc.lee@gmail.com>
Sun, 14 Jun 2026 23:49:52 +0000 (08:49 +0900)
committerNamjae Jeon <linkinjeon@kernel.org>
Mon, 15 Jun 2026 10:39:31 +0000 (19:39 +0900)
This patch fixes the issue where a symbolic link size is displayed as 0.

Cc: stable@vger.kernel.org # v7.1
Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/ntfs/inode.c

index 2f2634baa285583bfee5eaec47b1baeab3125c16..efb34a5e94d9429760b6d7637b264743e52db6b4 100644 (file)
@@ -1199,6 +1199,9 @@ no_data_attr_special_case:
        else
                vi->i_blocks = ni->allocated_size >> 9;
 
+       if (S_ISLNK(vi->i_mode) && ni->target)
+               vi->i_size = strlen(ni->target);
+
        ntfs_debug("Done.");
        return 0;
 unm_err_out: