1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

Revert "s3-vfs: Fix stream_depot vfs module on btrfs."

This reverts commit 29f12e7d5960906935e3af1405e9759a07d64750.

The wrong patch was pushed, according to Andreas:
	I sent a second version cause the first was not complete. I've
	discussed with Volker after I sent the patch and then sent a new
	patch which

	a) also does the right thin in the unlink case
	b) only tried to remove the server is the deletion of the file
	   was successful.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
David Disseldorp 2013-11-12 16:33:20 +01:00
parent 25be92b925
commit 2405e7906c

View File

@ -665,7 +665,6 @@ static int streams_depot_unlink(vfs_handle_struct *handle,
static int streams_depot_rmdir(vfs_handle_struct *handle, const char *path)
{
struct smb_filename *smb_fname_base = NULL;
char *dirname;
int ret = -1;
DEBUG(10, ("streams_depot_rmdir called for %s\n", path));
@ -691,14 +690,15 @@ static int streams_depot_rmdir(vfs_handle_struct *handle, const char *path)
return -1;
}
dirname = stream_dir(handle,
smb_fname_base,
&smb_fname_base->st,
false);
if (dirname != NULL) {
SMB_VFS_NEXT_RMDIR(handle, dirname);
if (smb_fname_base->st.st_ex_nlink == 2) {
char *dirname = stream_dir(handle, smb_fname_base,
&smb_fname_base->st, false);
if (dirname != NULL) {
SMB_VFS_NEXT_RMDIR(handle, dirname);
}
TALLOC_FREE(dirname);
}
TALLOC_FREE(dirname);
ret = SMB_VFS_NEXT_RMDIR(handle, path);