messaging_register(sconn->msg_ctx, sconn, MSG_SMB_OPEN_RETRY,
process_open_retry_message);
- if (lp_kernel_oplocks(-1)) {
+ return true;
+}
+
+void init_kernel_oplocks(struct smbd_server_connection *sconn)
+{
+ /* only initialize once */
+ if (koplocks == NULL) {
#if HAVE_KERNEL_OPLOCKS_IRIX
koplocks = irix_init_kernel_oplocks(sconn);
#elif HAVE_KERNEL_OPLOCKS_LINUX
koplocks = onefs_init_kernel_oplocks(sconn);
#endif
}
-
- return True;
}
void share_mode_entry_to_message(char *msg, const struct share_mode_entry *e);
void message_to_share_mode_entry(struct share_mode_entry *e, char *msg);
bool init_oplocks(struct smbd_server_connection *sconn);
+void init_kernel_oplocks(struct smbd_server_connection *sconn);
/* The following definitions come from smbd/oplock_irix.c */