ksmbd: don't update ->op_state as OPLOCK_STATE_NONE on error
authorNamjae Jeon <linkinjeon@kernel.org>
Wed, 22 Nov 2023 14:01:43 +0000 (23:01 +0900)
committerSteve French <stfrench@microsoft.com>
Fri, 24 Nov 2023 02:50:45 +0000 (20:50 -0600)
ksmbd set ->op_state as OPLOCK_STATE_NONE on lease break ack error.
op_state of lease should not be updated because client can send lease
break ack again. This patch fix smb2.lease.breaking2 test failure.

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

index 427dd2295f16df986ff77ccf4dc55abef937db40..d369b98a6e10373bbc331beba1daa4414db619a9 100644 (file)
@@ -8234,7 +8234,6 @@ static void smb21_lease_break_ack(struct ksmbd_work *work)
                return;
 
 err_out:
-       opinfo->op_state = OPLOCK_STATE_NONE;
        wake_up_interruptible_all(&opinfo->oplock_q);
        atomic_dec(&opinfo->breaking_cnt);
        wake_up_interruptible_all(&opinfo->oplock_brk);