ksmbd: preserve compression state across opens

The compression state can be emulated with the DOS attribute xattr when the
backing filesystem cannot store it directly.  Do not limit that state to
shares with store dos attributes enabled, otherwise a file reopened through
another handle can lose FILE_ATTRIBUTE_COMPRESSED in file information
responses.

Load only the compressed bit from the DOS attribute xattr when store dos
attributes is disabled.  Keep the normal DOS attribute behavior unchanged
when it is enabled.  Also avoid clearing an already restored compressed
bit just because the backing filesystem does not report FS_COMPR_FL.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
Namjae Jeon 2026-07-08 21:55:15 +09:00
commit 962b9df472
2 changed files with 12 additions and 16 deletions