OSDN Git Service

cifs: do not attempt cifs operation on smb2+ rename error
authorFrank Sorenson <sorenson@redhat.com>
Tue, 16 Apr 2019 13:37:27 +0000 (08:37 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2019 07:31:59 +0000 (09:31 +0200)
commitda502d3438aa97237032f5494993e767cdebf631
treeedf978fe0befcc2637e575f43f4f88f489b85751
parenta4ccc9e5ad7f2e37777873e63514e6bfae1146d8
cifs: do not attempt cifs operation on smb2+ rename error

commit 652727bbe1b17993636346716ae5867627793647 upstream.

A path-based rename returning EBUSY will incorrectly try opening
the file with a cifs (NT Create AndX) operation on an smb2+ mount,
which causes the server to force a session close.

If the mount is smb2+, skip the fallback.

Signed-off-by: Frank Sorenson <sorenson@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/inode.c