summaryrefslogtreecommitdiff
path: root/fs/smb/client/reparse.c
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.com>2024-01-28 01:12:01 -0300
committerSteve French <stfrench@microsoft.com>2024-03-10 19:33:58 -0500
commitea41367b2a602f602ea6594fc4a310520dcc64f4 (patch)
tree97b7e2daaff8072e6ce6d51d35cb647b484f8e3e /fs/smb/client/reparse.c
parente0e1e09b2c41d383a2483f2ee5227b724860ced1 (diff)
smb: client: introduce SMB2_OP_QUERY_WSL_EA
Add a new command to smb2_compound_op() for querying WSL extended attributes from reparse points. Signed-off-by: Paulo Alcantara <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/reparse.c')
-rw-r--r--fs/smb/client/reparse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/smb/client/reparse.c b/fs/smb/client/reparse.c
index 24feeaa32280..e8be756e6768 100644
--- a/fs/smb/client/reparse.c
+++ b/fs/smb/client/reparse.c
@@ -205,15 +205,15 @@ static int wsl_set_xattrs(struct inode *inode, umode_t _mode,
__le64 dev = cpu_to_le64(((u64)MINOR(_dev) << 32) | MAJOR(_dev));
__le64 mode = cpu_to_le64(_mode);
struct wsl_xattr xattrs[] = {
- { .name = "$LXUID", .value = uid, .size = 4, },
- { .name = "$LXGID", .value = gid, .size = 4, },
- { .name = "$LXMOD", .value = mode, .size = 4, },
- { .name = "$LXDEV", .value = dev, .size = 8, },
+ { .name = SMB2_WSL_XATTR_UID, .value = uid, .size = SMB2_WSL_XATTR_UID_SIZE, },
+ { .name = SMB2_WSL_XATTR_GID, .value = gid, .size = SMB2_WSL_XATTR_GID_SIZE, },
+ { .name = SMB2_WSL_XATTR_MODE, .value = mode, .size = SMB2_WSL_XATTR_MODE_SIZE, },
+ { .name = SMB2_WSL_XATTR_DEV, .value = dev, .size = SMB2_WSL_XATTR_DEV_SIZE, },
};
size_t cc_len;
u32 dlen = 0, next = 0;
int i, num_xattrs;
- u8 name_size = strlen(xattrs[0].name) + 1;
+ u8 name_size = SMB2_WSL_XATTR_NAME_LEN + 1;
memset(iov, 0, sizeof(*iov));