]> www.infradead.org Git - users/hch/misc.git/commit
ksmbd: make __dir_empty() compatible with POSIX
authorHobin Woo <hobin.woo@samsung.com>
Wed, 4 Sep 2024 04:36:35 +0000 (13:36 +0900)
committerSteve French <stfrench@microsoft.com>
Sat, 14 Sep 2024 05:03:15 +0000 (00:03 -0500)
commitca4974ca954561e79f8871d220bb08f14f64f57c
treeab13287214030eb467a0ea880072f5cd3b77566c
parentee426bfb9d09b29987369b897fe9b6485ac2be27
ksmbd: make __dir_empty() compatible with POSIX

Some file systems may not provide dot (.) and dot-dot (..) as they are
optional in POSIX. ksmbd can misjudge emptiness of a directory in those
file systems, since it assumes there are always at least two entries:
dot and dot-dot.
Just don't count dot and dot-dot.

Cc: stable@vger.kernel.org # v6.1+
Signed-off-by: Hobin Woo <hobin.woo@samsung.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/vfs.c