ksmbd: do not grant v2 lease if parent lease key and epoch are not set
authorNamjae Jeon <linkinjeon@kernel.org>
Wed, 1 May 2024 12:58:15 +0000 (21:58 +0900)
committerSteve French <stfrench@microsoft.com>
Sun, 5 May 2024 04:53:36 +0000 (23:53 -0500)
commit691aae4f36f9825df6781da4399a1e718951085a
treed7cfabff252f529507b1659df61a90f56b08a933
parentd1c189c6cb8b0fb7b5ee549237d27889c40c2f8b
ksmbd: do not grant v2 lease if parent lease key and epoch are not set

This patch fix xfstests generic/070 test with smb2 leases = yes.

cifs.ko doesn't set parent lease key and epoch in create context v2 lease.
ksmbd suppose that parent lease and epoch are vaild if data length is
v2 lease context size and handle directory lease using this values.
ksmbd should hanle it as v1 lease not v2 lease if parent lease key and
epoch are not set in create context v2 lease.

Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/oplock.c