The Samba-Bugzilla – Attachment 9715 Details for
Bug 10467
samba.vfstest.stream_depot test fails against Btrfs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix for v4-1-test branch, cherry-picked from master
0001-s3-vfs-Fix-stream_depot-vfs-module-on-btrfs.patch (text/plain), 2.05 KB, created by
David Disseldorp
on 2014-02-24 18:09:14 UTC
(
hide
)
Description:
fix for v4-1-test branch, cherry-picked from master
Filename:
MIME Type:
Creator:
David Disseldorp
Created:
2014-02-24 18:09:14 UTC
Size:
2.05 KB
patch
obsolete
>From 092843f28e54aba379a9629e364b40354b18bc39 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Fri, 8 Nov 2013 15:41:18 +0100 >Subject: [PATCH] s3-vfs: Fix stream_depot vfs module on btrfs. > >Checking if the directory is empty using 'nlink == 2' only checks if >there are no subdirectories. It doesn't indicate if there are files in >the directory. However checking link count for no subdirectories is >wrong and applications shouldn't rely on it, see: > >https://lkml.org/lkml/2012/2/1/756 > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=10467 > >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: David Disseldorp <ddiss@samba.org> >(cherry picked from commit 654b784e9c9c3563afd1af853f4795117c258e56) >--- > source3/modules/vfs_streams_depot.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > >diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c >index 3ce7067..8ba07fc 100644 >--- a/source3/modules/vfs_streams_depot.c >+++ b/source3/modules/vfs_streams_depot.c >@@ -646,7 +646,8 @@ static int streams_depot_unlink(vfs_handle_struct *handle, > return -1; > } > >- if (smb_fname_base->st.st_ex_nlink == 1) { >+ ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname); >+ if (ret == 0) { > char *dirname = stream_dir(handle, smb_fname_base, > &smb_fname_base->st, false); > >@@ -656,8 +657,6 @@ static int streams_depot_unlink(vfs_handle_struct *handle, > TALLOC_FREE(dirname); > } > >- ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname); >- > TALLOC_FREE(smb_fname_base); > return ret; > } >@@ -690,7 +689,8 @@ static int streams_depot_rmdir(vfs_handle_struct *handle, const char *path) > return -1; > } > >- if (smb_fname_base->st.st_ex_nlink == 2) { >+ ret = SMB_VFS_NEXT_RMDIR(handle, path); >+ if (ret == 0) { > char *dirname = stream_dir(handle, smb_fname_base, > &smb_fname_base->st, false); > >@@ -700,8 +700,6 @@ static int streams_depot_rmdir(vfs_handle_struct *handle, const char *path) > TALLOC_FREE(dirname); > } > >- ret = SMB_VFS_NEXT_RMDIR(handle, path); >- > TALLOC_FREE(smb_fname_base); > return ret; > } >-- >1.8.4.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
asn
:
review+
Actions:
View
Attachments on
bug 10467
: 9715