In future we should avoid dereference 'struct share_mode_lock'
as much as possible.
This will also allow us to load struct share_mode_data
only if required in future.
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>
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.
********************************************************************/
struct share_mode_data *data;
};
+NTSTATUS share_mode_lock_access_private_data(struct share_mode_lock *lck,
+ struct share_mode_data **data);
+
#endif