From ad8e6863c3791e50bc80418bc94f4970ed6b0e68 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Fri, 3 Jan 2020 11:58:38 -0700 Subject: [PATCH] system: Rename argument for kernel_flock function MS-SMB2 and the smbd code refer to this field as share_access. Use the same name in the function argument. Signed-off-by: Christof Schmitt Reviewed-by: Jeremy Allison --- source3/include/proto.h | 2 +- source3/lib/system.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source3/include/proto.h b/source3/include/proto.h index d543dc66955..72ac69e72f2 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -235,7 +235,7 @@ int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times); int sys_posix_fallocate(int fd, off_t offset, off_t len); int sys_fallocate(int fd, uint32_t mode, off_t offset, off_t len); -void kernel_flock(int fd, uint32_t share_mode, uint32_t access_mask); +void kernel_flock(int fd, uint32_t share_access, uint32_t access_mask); DIR *sys_fdopendir(int fd); int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); int sys_mknodat(int dirfd, const char *path, mode_t mode, SMB_DEV_T dev); diff --git a/source3/lib/system.c b/source3/lib/system.c index 679332255c0..f1265e0c43f 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -575,15 +575,15 @@ int sys_fallocate(int fd, uint32_t mode, off_t offset, off_t len) A flock() wrapper that will perform the kernel flock. ********************************************************************/ -void kernel_flock(int fd, uint32_t share_mode, uint32_t access_mask) +void kernel_flock(int fd, uint32_t share_access, uint32_t access_mask) { #ifdef HAVE_KERNEL_SHARE_MODES int kernel_mode = 0; - if (share_mode == FILE_SHARE_WRITE) { + if (share_access == FILE_SHARE_WRITE) { kernel_mode = LOCK_MAND|LOCK_WRITE; - } else if (share_mode == FILE_SHARE_READ) { + } else if (share_access == FILE_SHARE_READ) { kernel_mode = LOCK_MAND|LOCK_READ; - } else if (share_mode == FILE_SHARE_NONE) { + } else if (share_access == FILE_SHARE_NONE) { kernel_mode = LOCK_MAND; } if (kernel_mode) { -- 2.11.4.GIT