From: Ralph Boehme Date: Tue, 17 May 2022 12:47:03 +0000 (+0200) Subject: vfs_gpfs: indentation and README.Coding fixes X-Git-Tag: talloc-2.3.4~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0f7ced610013cad145ff14cedcfbb5388d1ea4f;p=thirdparty%2Fsamba.git vfs_gpfs: indentation and README.Coding fixes Best viewed with git show -w. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15069 Signed-off-by: Ralph Boehme Reviewed-by: Christof Schmitt --- diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 43c625c3290..419ab94b98d 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -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)