diff options
author | David Disseldorp <ddiss@samba.org> | 2013-11-12 16:33:20 +0100 |
---|---|---|
committer | David Disseldorp <ddiss@samba.org> | 2013-11-12 17:33:12 +0100 |
commit | 2405e7906c41a2cd08f7e643dfc83b6380cadcf4 (patch) | |
tree | e2489acd34e82d8a77c5a8bbb924f938d6c1986f /source3/modules | |
parent | 25be92b92567d962fa66261f565d3a8116f97e30 (diff) | |
download | samba-2405e7906c41a2cd08f7e643dfc83b6380cadcf4.tar.gz |
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>
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_streams_depot.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index f33d998b4e0..3ada92eeb5e 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -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); |