Re: [PATCH] smb/server: check destination is open when renaming
Namjae Jeon <[email protected]>
| Newsgroups | org.kernel.vger.linux-cifs |
|---|---|
| Message-ID | <CAKYAXd_wZG+T=WYdZC_S7jPsUmsUAeQ_UDsn7uKWzUS5nSSgoQ@mail.gmail.com> |
On Tue, Aug 4, 2026 at 4:16 PM ChenXiaoSong <[email protected]> wrote: > > Hi Namjae, > > Currently, both the client and server support only > `FileRenameInformation` (level 10) and do not implement > `FileRenameInformationEx` (level 65). > > Level 10 does not support `FILE_RENAME_POSIX_SEMANTICS`. Okay. We can implement this in ksmbd and cifs.ko to pass generic/035 test. Thanks for sharing it. > > - MS-FSCC 2.4.42 FileRenameInformation: > https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/1d2673a8-8fb9-4868-920a-775ccaa30cf8 > - MS-FSCC 2.4.43 FileRenameInformationEx: > https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/4217551b-d2c0-42cb-9dc1-69a716cf6d0c > - MS-FSA 2.1.5.15.12 FileRenameInformation: > https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fsa/87f86c9b-6c2a-4803-84b7-131a74a434fa > > On 6/13/26 11:52, Namjae Jeon wrote: > > This check is also applied when SMB3 POSIX extensions are negotiated. > > POSIX rename semantics allow replacing an open destination while > > existing file descriptors continue to reference the unlinked inode. > > The check should therefore at least be skipped when > > work->tcon->posix_extensions is set. > > -- > ChenXiaoSong <[email protected]> > Chinese Homepage: https://chenxiaosong.com > English Homepage: https://chenxiaosong.com/en >