summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/locking/share_mode_lock.c12
-rw-r--r--source3/locking/share_mode_lock_private.h3
2 files changed, 15 insertions, 0 deletions
diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c
index d0954b80336..4fd9d1b3b50 100644
--- a/source3/locking/share_mode_lock.c
+++ b/source3/locking/share_mode_lock.c
@@ -839,6 +839,18 @@ static NTSTATUS get_static_share_mode_data(
return NT_STATUS_OK;
}
+NTSTATUS share_mode_lock_access_private_data(struct share_mode_lock *lck,
+ struct share_mode_data **data)
+{
+ /*
+ * For now we always have lck->data,
+ * but we may change that in future.
+ */
+ SMB_ASSERT(lck->data != NULL);
+ *data = lck->data;
+ return NT_STATUS_OK;
+}
+
/*******************************************************************
Get a share_mode_lock, Reference counted to allow nested calls.
********************************************************************/
diff --git a/source3/locking/share_mode_lock_private.h b/source3/locking/share_mode_lock_private.h
index 14a3c1b2a47..7e11d58fa7a 100644
--- a/source3/locking/share_mode_lock_private.h
+++ b/source3/locking/share_mode_lock_private.h
@@ -21,4 +21,7 @@ struct share_mode_lock {
struct share_mode_data *data;
};
+NTSTATUS share_mode_lock_access_private_data(struct share_mode_lock *lck,
+ struct share_mode_data **data);
+
#endif