Skip to content
Commit 897fba11 authored by Steve French's avatar Steve French
Browse files

remove directory incorrectly tries to set delete on close on non-empty directories



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: default avatarSteve French <steve.french@primarydata.com>
CC: Stable <stable@vger.kernel.org>
Acked-by: default avatarSachin Prabhu <sprabhu@redhat.com>
parent 5a4f7e8e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment