cifs: fix lease break oops in xfstest generic/098
authorSteve French <stfrench@microsoft.com>
Sun, 11 Jun 2023 16:23:32 +0000 (11:23 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 14:01:01 +0000 (16:01 +0200)
commitd7d6e830cd0ff2c71251ff6c8943a09e35cf0f6b
tree397e43c31dd9686e48d04affbd40757c21cb15e0
parente8119d4d1611309ae545d292ba4d700f3e883040
cifs: fix lease break oops in xfstest generic/098

[ Upstream commit c774e6779f38bf36f0cce65e30793704bab4b0d7 ]

umount can race with lease break so need to check if
tcon->ses->server is still valid to send the lease
break response.

Reviewed-by: Bharath SM <bharathsm@microsoft.com>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Fixes: 59a556aebc43 ("SMB3: drop reference to cfile before sending oplock break")
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/file.c