smbd: Factor out remove_stale_share_mode_entries
[mat/samba.git] / source3 / locking / proto.h
index 1573f6b306d3036092c743c34fd564c7aa073d96..2c9654ce28b8a8528c818aa4b7a88b6721bfb1e1 100644 (file)
@@ -30,6 +30,9 @@ void brl_shutdown(void);
 
 unsigned int brl_num_locks(const struct byte_range_lock *brl);
 struct files_struct *brl_fsp(struct byte_range_lock *brl);
+bool brl_have_read_oplocks(const struct byte_range_lock *brl);
+void brl_set_have_read_oplocks(struct byte_range_lock *brl,
+                              bool have_read_oplocks);
 
 NTSTATUS brl_lock_windows_default(struct byte_range_lock *br_lck,
                struct lock_struct *plock,
@@ -170,9 +173,10 @@ void get_file_infos(struct file_id id,
                    bool *delete_on_close,
                    struct timespec *write_time);
 bool is_valid_share_mode_entry(const struct share_mode_entry *e);
-bool share_mode_stale_pid(struct share_mode_data *d, unsigned idx);
-void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
+bool share_mode_stale_pid(struct share_mode_data *d, uint32_t idx);
+bool set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
                    uid_t uid, uint64_t mid, uint16 op_type);
+void remove_stale_share_mode_entries(struct share_mode_data *d);
 bool del_share_mode(struct share_mode_lock *lck, files_struct *fsp);
 bool mark_share_mode_disconnected(struct share_mode_lock *lck,
                                  struct files_struct *fsp);