Re: [PATCH] ksmbd: return the cause of a failed link
From: Ian Bridges
Date: Fri Nov 27 2026 - 22:16:49 EST
Hi Namjae,
Thanks for the review. You're right that passing the errors through
does not handle all the link failures correctly.
I'd like to propose one default mapping for errors from the VFS, shared
by the handlers, with the link path as its first user. It would cover
the cases you named, STATUS_NOT_SUPPORTED for a filesystem without hard
links and STATUS_TOO_MANY_LINKS. Results that a handler carries in an
errno today, such as -EPERM for a sharing violation in smb2_open(),
would set the status directly instead. The other handlers would move
over later, each in its own patch.
Would you like a v2 of this patch along those lines?
Thanks,
Ian