[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Fri Sep 10 18:17:01 UTC 2021


The branch, master has been updated
       via  ed35fce4fe4 vfs_btrfs: fix btrfs_fget_compression()
      from  b053bea0af2 s4/torture/masktest: don't ignore unknown options

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit ed35fce4fe48b1fa26854a7b4bb151b5c5fb6fc6
Author: Ralph Boehme <slow at samba.org>
Date:   Mon Aug 9 19:30:21 2021 +0200

    vfs_btrfs: fix btrfs_fget_compression()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14790
    RB: vfs_btrfs compression support broken
    
    Reported-by: noel.kuntze at thermi.consulting
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Sep 10 18:16:18 UTC 2021 on sn-devel-184

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_btrfs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_btrfs.c b/source3/modules/vfs_btrfs.c
index 789bc6d6e8a..a31b232af4d 100644
--- a/source3/modules/vfs_btrfs.c
+++ b/source3/modules/vfs_btrfs.c
@@ -460,11 +460,12 @@ static NTSTATUS btrfs_fget_compression(struct vfs_handle_struct *handle,
 	const char *p = NULL;
 	int ret;
 	long flags = 0;
+	int fsp_fd = fsp_get_pathref_fd(fsp);
 	int fd = -1;
 	NTSTATUS status;
 
 	if (!fsp->fsp_flags.is_pathref) {
-		ret = ioctl(fd, FS_IOC_GETFLAGS, &flags);
+		ret = ioctl(fsp_fd, FS_IOC_GETFLAGS, &flags);
 		if (ret < 0) {
 			DBG_WARNING("FS_IOC_GETFLAGS failed: %s, fd %lld\n",
 				    strerror(errno), (long long)fd);
@@ -482,9 +483,7 @@ static NTSTATUS btrfs_fget_compression(struct vfs_handle_struct *handle,
 		return NT_STATUS_NOT_IMPLEMENTED;
 	}
 
-	fd = fsp_get_pathref_fd(fsp);
-
-	p = sys_proc_fd_path(fd, buf, sizeof(buf));
+	p = sys_proc_fd_path(fsp_fd, buf, sizeof(buf));
 	if (p == NULL) {
 		return NT_STATUS_NO_MEMORY;
 	}


-- 
Samba Shared Repository



More information about the samba-cvs mailing list