summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunchul Lee <hyc.lee@gmail.com>2026-03-12 02:36:24 +0300
committerNamjae Jeon <linkinjeon@kernel.org>2026-03-16 14:27:30 +0300
commita73258681279bceb4e9210d86204bae14d3ea795 (patch)
tree837c627d2fcec26ae64a4052b2624022576fafa0
parentea3566a3fa235cd0325b2bedf91ceec65073004b (diff)
downloadlinux-a73258681279bceb4e9210d86204bae14d3ea795.tar.xz
ntfs: fix WSL ea restore condition
Use NTFS_VOL_GID(not NTFS_VOL_UID) for restoring the gid, and call ntfs_ea_get_wsl_inode() only when $EA_INFORMATION exists. Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
-rw-r--r--fs/ntfs/ea.c2
-rw-r--r--fs/ntfs/inode.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/ntfs/ea.c b/fs/ntfs/ea.c
index 5b108d0ccec7..386eb0c5f303 100644
--- a/fs/ntfs/ea.c
+++ b/fs/ntfs/ea.c
@@ -368,7 +368,7 @@ int ntfs_ea_get_wsl_inode(struct inode *inode, dev_t *rdevp, unsigned int flags)
i_uid_write(inode, le32_to_cpu(v));
}
- if (!(flags & NTFS_VOL_UID)) {
+ if (!(flags & NTFS_VOL_GID)) {
/* Load gid to lxgid EA */
err = ntfs_get_ea(inode, "$LXGID", sizeof("$LXGID") - 1, &v,
sizeof(v));
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index 43d7ecc14c15..7547174a99ae 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -865,10 +865,10 @@ static int ntfs_read_locked_inode(struct inode *vi)
}
skip_attr_list_load:
err = ntfs_attr_lookup(AT_EA_INFORMATION, NULL, 0, 0, 0, NULL, 0, ctx);
- if (!err)
+ if (!err) {
NInoSetHasEA(ni);
-
- ntfs_ea_get_wsl_inode(vi, &dev, flags);
+ ntfs_ea_get_wsl_inode(vi, &dev, flags);
+ }
if (m->flags & MFT_RECORD_IS_DIRECTORY) {
vi->i_mode |= S_IFDIR;