]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ksmbd: provide zero as a unique ID to the Mac client
authorNamjae Jeon <linkinjeon@kernel.org>
Wed, 21 May 2025 00:02:29 +0000 (09:02 +0900)
committerSteve French <stfrench@microsoft.com>
Tue, 27 May 2025 15:25:12 +0000 (10:25 -0500)
commit571781eb7ffefa65b0e922c8031e42b4411a40d4
treeec6280ea25ba869dac5981f719e3e014a4459437
parentd91c0751d0a622bd29b6078a6d0e183c8342a574
ksmbd: provide zero as a unique ID to the Mac client

The Mac SMB client code seems to expect the on-disk file identifier
to have the semantics of HFS+ Catalog Node Identifier (CNID).
ksmbd provides the inode number as a unique ID to the client,
but in the case of subvolumes of btrfs, there are cases where different
files have the same inode number, so the mac smb client treats it
as an error. There is a report that a similar problem occurs
when the share is ZFS.
Returning UniqueId of zero will make the Mac client to stop using and
trusting the file id returned from the server.

Reported-by: Justin Turner Arthur <justinarthur@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/connection.h
fs/smb/server/smb2pdu.c
fs/smb/server/smb2pdu.h