]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fs/ntfs3: fix $LXDEV xattr lookup
authorZhan Xusheng <zhanxusheng1024@gmail.com>
Fri, 27 Mar 2026 03:24:54 +0000 (11:24 +0800)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 7 Apr 2026 16:43:36 +0000 (18:43 +0200)
Use correct xattr name ("$LXDEV") and buffer size when calling
ntfs_get_ea(), otherwise the attribute may not be read.

Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/xattr.c

index 3fffda7848922334277d536f542a32af5fc4084f..9eeac0ab2b7147c840a23334d1210cd32bf29e0b 100644 (file)
@@ -1031,7 +1031,7 @@ void ntfs_get_wsl_perm(struct inode *inode)
                i_gid_write(inode, (gid_t)le32_to_cpu(value[1]));
                inode->i_mode = le32_to_cpu(value[2]);
 
-               if (ntfs_get_ea(inode, "$LXDEV", sizeof("$$LXDEV") - 1,
+               if (ntfs_get_ea(inode, "$LXDEV", sizeof("$LXDEV") - 1,
                                &value[0], sizeof(value),
                                &sz) == sizeof(value[0])) {
                        inode->i_rdev = le32_to_cpu(value[0]);