]> git.baikalelectronics.ru Git - kernel.git/commit
ksmbd: don't remove dos attribute xattr on O_TRUNC open
authorNamjae Jeon <linkinjeon@kernel.org>
Sun, 14 Aug 2022 13:40:25 +0000 (22:40 +0900)
committerSteve French <stfrench@microsoft.com>
Tue, 16 Aug 2022 02:07:01 +0000 (21:07 -0500)
commitca48cfd1eaa9b6e1d979a31d41eb9b7dced31072
treea3d48943640fb1339021b9f609d63208ad5f62f3
parentab8d9a4f554d753cf61ac4638ce2547c13dacf84
ksmbd: don't remove dos attribute xattr on O_TRUNC open

When smb client open file in ksmbd share with O_TRUNC, dos attribute
xattr is removed as well as data in file. This cause the FSCTL_SET_SPARSE
request from the client fails because ksmbd can't update the dos attribute
after setting ATTR_SPARSE_FILE. And this patch fix xfstests generic/469
test also.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/smb2pdu.c