s3:locking: remove unused get_share_mode_lock()
authorStefan Metzmacher <metze@samba.org>
Wed, 31 Aug 2022 13:51:21 +0000 (15:51 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 20 Sep 2022 01:34:55 +0000 (01:34 +0000)
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>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Sep 20 01:34:55 UTC 2022 on sn-devel-184

source3/locking/share_mode_lock.c
source3/locking/share_mode_lock.h

index e52cd3df22c2de4ab8e28cefb6ce2211a8e9205f..84497f42145dbd67bb2b2049b2356b6951b5f639 100644 (file)
@@ -1065,12 +1065,13 @@ static int share_mode_lock_destructor(struct share_mode_lock *lck)
        return 0;
 }
 
-struct share_mode_lock *get_share_mode_lock(
-       TALLOC_CTX *mem_ctx,
-       struct file_id id,
-       const char *servicepath,
-       const struct smb_filename *smb_fname,
-       const struct timespec *old_write_time)
+/*******************************************************************
+ Fetch a share mode where we know one MUST exist. This call reference
+ counts it internally to allow for nested lock fetches.
+********************************************************************/
+
+struct share_mode_lock *get_existing_share_mode_lock(TALLOC_CTX *mem_ctx,
+                                                    const struct file_id id)
 {
        struct share_mode_lock *lck = NULL;
        NTSTATUS status;
@@ -1081,9 +1082,9 @@ struct share_mode_lock *get_share_mode_lock(
        }
 
        status = get_share_mode_lock_internal(id,
-                                             servicepath,
-                                             smb_fname,
-                                             old_write_time,
+                                             NULL, /* servicepath */
+                                             NULL, /* smb_fname */
+                                             NULL, /* old_write_time */
                                              lck);
        if (!NT_STATUS_IS_OK(status)) {
                DBG_GET_SHARE_MODE_LOCK(status,
@@ -1097,17 +1098,6 @@ struct share_mode_lock *get_share_mode_lock(
        return lck;
 }
 
-/*******************************************************************
- Fetch a share mode where we know one MUST exist. This call reference
- counts it internally to allow for nested lock fetches.
-********************************************************************/
-
-struct share_mode_lock *get_existing_share_mode_lock(TALLOC_CTX *mem_ctx,
-                                                    const struct file_id id)
-{
-       return get_share_mode_lock(mem_ctx, id, NULL, NULL, NULL);
-}
-
 static void share_mode_wakeup_waiters_fn(
        struct share_mode_lock *lck,
        void *private_data)
index b5ba2cffcbfcd7788ef2f4d43cb2ea3c17f561b3..0ce539229b544f68d39a6f5cc152be4517263832 100644 (file)
@@ -34,12 +34,6 @@ bool locking_end(void);
 
 struct file_id share_mode_lock_file_id(const struct share_mode_lock *lck);
 
-struct share_mode_lock *get_share_mode_lock(
-       TALLOC_CTX *mem_ctx,
-       struct file_id id,
-       const char *servicepath,
-       const struct smb_filename *smb_fname,
-       const struct timespec *old_write_time);
 struct share_mode_lock *get_existing_share_mode_lock(TALLOC_CTX *mem_ctx,
                                                     struct file_id id);