]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
remove directory incorrectly tries to set delete on close on non-empty directories
authorSteve French <smfrench@gmail.com>
Fri, 13 May 2016 02:20:36 +0000 (21:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Jun 2016 19:15:48 +0000 (12:15 -0700)
commitb7d7ba3115bfff550958703edd4bdbd3691aea12
treec6d0c7a69de971f0f27d52f203551d27f840d6e0
parent6ff3df201009776bd6d4316eb76078a977deb566
remove directory incorrectly tries to set delete on close on non-empty directories

commit 897fba1172d637d344f009d700f7eb8a1fa262f1 upstream.

Wrong return code was being returned on SMB3 rmdir of
non-empty directory.

For SMB3 (unlike for cifs), we attempt to delete a directory by
set of delete on close flag on the open. Windows clients set
this flag via a set info (SET_FILE_DISPOSITION to set this flag)
which properly checks if the directory is empty.

With this patch on smb3 mounts we correctly return
 "DIRECTORY NOT EMPTY"
on attempts to remove a non-empty directory.

Signed-off-by: Steve French <steve.french@primarydata.com>
Acked-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2glob.h
fs/cifs/smb2inode.c
fs/cifs/smb2pdu.c
fs/cifs/smb2proto.h