The branch, master has been updated
       via  46791989a94 vfs_gpfs: Fix CID 1666430 Control flow issues (DEADCODE)
      from  f2ccf020046 vfs_ceph_new: use vfs_ceph_iget/vfs_ceph_iput in 
vfs_ceph_disk_free

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


- Log -----------------------------------------------------------------
commit 46791989a94a3a8c61a21e3e88ae88caf8563c86
Author: Anoop C S <[email protected]>
Date:   Fri Oct 3 11:27:29 2025 +0530

    vfs_gpfs: Fix CID 1666430 Control flow issues (DEADCODE)
    
    Restore the saved errno properly and record it with vfs_aio_state once
    vfs_gpfs_get_winattrs_helper() returns for async code path.
    
    Signed-off-by: Anoop C S <[email protected]>
    Reviewed-by: Guenther Deschner <[email protected]>
    
    Autobuild-User(master): Günther Deschner <[email protected]>
    Autobuild-Date(master): Wed Nov 26 16:48:00 UTC 2025 on atb-devel-224

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

Summary of changes:
 source3/modules/vfs_gpfs.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 9c88641577e..3317d520e23 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1448,11 +1448,6 @@ static int vfs_gpfs_get_winattrs_helper(
 
        ret = gpfswrap_get_winattrs(fsp_get_pathref_fd(fd), &state->attrs);
 
-       if (ret == -1) {
-               state->job_state.vfs_aio_state.error = errno;
-               return ret;
-       }
-
        if (ret == -1 && errno == EACCES) {
                int saved_errno = 0;
 
@@ -1468,16 +1463,12 @@ static int vfs_gpfs_get_winattrs_helper(
                ret = gpfswrap_get_winattrs(
                        fsp_get_pathref_fd(fd),
                        &state->attrs);
-               if (ret == -1) {
-                       saved_errno = errno;
-               }
+
+               saved_errno = errno;
 
                drop_effective_capability(DAC_OVERRIDE_CAPABILITY);
 
-               if (saved_errno != 0) {
-                       state->job_state.vfs_aio_state.error = saved_errno;
-                       ret = saved_errno;
-               }
+               errno = saved_errno;
        }
        return ret;
 }
@@ -1633,6 +1624,7 @@ static void vfs_gpfs_get_winattrs_do_async(void 
*private_data)
        ret = vfs_gpfs_get_winattrs_helper(state);
 
        if (ret == -1) {
+               state->job_state.vfs_aio_state.error = errno;
                DBG_WARNING("Getting winattrs failed for %s: %s\n",
                                state->job_state.dir_fsp->fsp_name->base_name,
                                strerror(errno));


-- 
Samba Shared Repository

Reply via email to