vfs: Rename argument for kernel_flock function
authorChristof Schmitt <cs@samba.org>
Fri, 3 Jan 2020 19:05:57 +0000 (12:05 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 8 Jan 2020 00:01:36 +0000 (00:01 +0000)
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 <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/vfs.h
source3/include/vfs_macros.h

index 28a3ce6054379e21beb19a5f5418970cb9d1004c..d23cf59fe1d6a6a5348462ef97d5d216f7bde1e1 100644 (file)
@@ -808,7 +808,7 @@ struct vfs_fn_pointers {
                            off_t len);
        bool (*lock_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, off_t offset, off_t count, int type);
        int (*kernel_flock_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp,
-                              uint32_t share_mode, uint32_t access_mask);
+                              uint32_t share_access, uint32_t access_mask);
        int (*fcntl_fn)(struct vfs_handle_struct *handle,
                        struct files_struct *fsp, int cmd, va_list cmd_arg);
        int (*linux_setlease_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, int leasetype);
@@ -1338,7 +1338,7 @@ bool smb_vfs_call_lock(struct vfs_handle_struct *handle,
                       struct files_struct *fsp, int op, off_t offset,
                       off_t count, int type);
 int smb_vfs_call_kernel_flock(struct vfs_handle_struct *handle,
-                             struct files_struct *fsp, uint32_t share_mode,
+                             struct files_struct *fsp, uint32_t share_access,
                              uint32_t access_mask);
 int smb_vfs_call_fcntl(struct vfs_handle_struct *handle,
                       struct files_struct *fsp, int cmd, ...);
index 6a7cbf2275d7827a4b3043b9527d7f20873ed0cd..cec8f6f204d47db6005fd847897257cb22e76c9c 100644 (file)
 #define SMB_VFS_NEXT_LOCK(handle, fsp, op, offset, count, type) \
        smb_vfs_call_lock((handle)->next, (fsp), (op), (offset), (count), (type))
 
-#define SMB_VFS_KERNEL_FLOCK(fsp, share_mode, access_mask) \
-       smb_vfs_call_kernel_flock((fsp)->conn->vfs_handles, (fsp), (share_mode), (access_mask))
-#define SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_mode, access_mask)        \
-       smb_vfs_call_kernel_flock((handle)->next, (fsp), (share_mode), (access_mask))
+#define SMB_VFS_KERNEL_FLOCK(fsp, share_access, access_mask) \
+       smb_vfs_call_kernel_flock((fsp)->conn->vfs_handles, (fsp), (share_access), (access_mask))
+#define SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_access, access_mask)      \
+       smb_vfs_call_kernel_flock((handle)->next, (fsp), (share_access), (access_mask))
 
 #define SMB_VFS_FCNTL(fsp, cmd, ...) \
        smb_vfs_call_fcntl((fsp)->conn->vfs_handles, (fsp), (cmd), (__VA_ARGS__))