]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_gpfs: indentation and README.Coding fixes
authorRalph Boehme <slow@samba.org>
Tue, 17 May 2022 12:47:03 +0000 (14:47 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 3 Jun 2022 20:56:35 +0000 (20:56 +0000)
Best viewed with git show -w.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15069

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
source3/modules/vfs_gpfs.c

index 43c625c3290c5886250ba6416aaa5d12c5e1cec7..419ab94b98dcde7d1e20dbfb393b91ff1e49c492 100644 (file)
@@ -1365,23 +1365,25 @@ static int gpfsacl_emu_chmod(vfs_handle_struct *handle,
 
 static int vfs_gpfs_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
 {
-                SMB_STRUCT_STAT st;
-                int rc;
-
-                if (SMB_VFS_NEXT_FSTAT(handle, fsp, &st) != 0) {
-                        return -1;
-                }
-
-                /* avoid chmod() if possible, to preserve acls */
-                if ((st.st_ex_mode & ~S_IFMT) == mode) {
-                        return 0;
-                }
-
-                rc = gpfsacl_emu_chmod(handle, fsp->fsp_name,
-                                       mode);
-                if (rc == 1)
-                        return SMB_VFS_NEXT_FCHMOD(handle, fsp, mode);
-                return rc;
+       SMB_STRUCT_STAT st;
+       int rc;
+
+       rc = SMB_VFS_NEXT_FSTAT(handle, fsp, &st);
+       if (rc != 0) {
+               return -1;
+       }
+
+       /* avoid chmod() if possible, to preserve acls */
+       if ((st.st_ex_mode & ~S_IFMT) == mode) {
+               return 0;
+       }
+
+       rc = gpfsacl_emu_chmod(handle, fsp->fsp_name,
+                              mode);
+       if (rc == 1) {
+               return SMB_VFS_NEXT_FCHMOD(handle, fsp, mode);
+       }
+       return rc;
 }
 
 static uint32_t vfs_gpfs_winattrs_to_dosmode(unsigned int winattrs)