Unverified Commit bb82fe08 authored by Zhan Xusheng's avatar Zhan Xusheng Committed by Konstantin Komarov
Browse files

fs/ntfs3: fix $LXDEV xattr lookup



Use correct xattr name ("$LXDEV") and buffer size when calling
ntfs_get_ea(), otherwise the attribute may not be read.

Signed-off-by: default avatarZhan Xusheng <zhanxusheng@xiaomi.com>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 859d7776
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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]);