summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2013-11-12 16:33:20 +0100
committerDavid Disseldorp <ddiss@samba.org>2013-11-12 17:33:12 +0100
commit2405e7906c41a2cd08f7e643dfc83b6380cadcf4 (patch)
treee2489acd34e82d8a77c5a8bbb924f938d6c1986f /source3
parent25be92b92567d962fa66261f565d3a8116f97e30 (diff)
downloadsamba-2405e7906c41a2cd08f7e643dfc83b6380cadcf4.tar.gz
samba-2405e7906c41a2cd08f7e643dfc83b6380cadcf4.tar.xz
samba-2405e7906c41a2cd08f7e643dfc83b6380cadcf4.zip
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')
-rw-r--r--source3/modules/vfs_streams_depot.c16
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);