summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2022-05-17 14:47:03 +0200
committerJeremy Allison <jra@samba.org>2022-06-03 20:56:35 +0000
commita0f7ced610013cad145ff14cedcfbb5388d1ea4f (patch)
tree7c4f3f3f5fc176d39b569f969481146bcc83449a /source3
parentac16351ff5a0c5b46f461c26516b85e8483bba83 (diff)
downloadsamba-a0f7ced610013cad145ff14cedcfbb5388d1ea4f.tar.gz
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 <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_gpfs.c36
1 files changed, 19 insertions, 17 deletions
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)