diff options
author | Stefan Metzmacher <metze@samba.org> | 2022-08-21 15:15:09 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2022-09-20 00:34:35 +0000 |
commit | e7cf1b07b6928f18b0147f4b6b74a97ae3fb667b (patch) | |
tree | 7f163aed18cc0eb557d4ba3f23e26ca0690fae18 /source3/smbd/vfs.c | |
parent | 6ab4457b4be139c4e5a3f44ce9bf8018ad09a58b (diff) | |
download | samba-e7cf1b07b6928f18b0147f4b6b74a97ae3fb667b.tar.gz |
s3:smbd: move locking related vfs functions to smbd/vfs.c
This allows us to make VFS_FIND local to smbd/vfs.c in the
next step.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/vfs.c')
-rw-r--r-- | source3/smbd/vfs.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 1d9f70bafc9..acd66f3ca20 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -2633,3 +2633,36 @@ NTSTATUS smb_vfs_call_freaddir_attr(struct vfs_handle_struct *handle, mem_ctx, attr_data); } + +bool smb_vfs_call_lock(struct vfs_handle_struct *handle, + struct files_struct *fsp, int op, off_t offset, + off_t count, int type) +{ + VFS_FIND(lock); + return handle->fns->lock_fn(handle, fsp, op, offset, count, type); +} + +bool smb_vfs_call_getlock(struct vfs_handle_struct *handle, + struct files_struct *fsp, off_t *poffset, + off_t *pcount, int *ptype, pid_t *ppid) +{ + VFS_FIND(getlock); + return handle->fns->getlock_fn(handle, fsp, poffset, pcount, ptype, + ppid); +} + +NTSTATUS smb_vfs_call_brl_lock_windows(struct vfs_handle_struct *handle, + struct byte_range_lock *br_lck, + struct lock_struct *plock) +{ + VFS_FIND(brl_lock_windows); + return handle->fns->brl_lock_windows_fn(handle, br_lck, plock); +} + +bool smb_vfs_call_brl_unlock_windows(struct vfs_handle_struct *handle, + struct byte_range_lock *br_lck, + const struct lock_struct *plock) +{ + VFS_FIND(brl_unlock_windows); + return handle->fns->brl_unlock_windows_fn(handle, br_lck, plock); +} |