Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
}
if (write_time) {
- struct timespec wt;
-
- wt = lck->data->changed_write_time;
- if (null_timespec(wt)) {
- wt = lck->data->old_write_time;
- }
-
- *write_time = wt;
+ *write_time = get_share_mode_write_time(lck);
}
TALLOC_FREE(lck);
TALLOC_FREE(lck);
return True;
}
+
+struct timespec get_share_mode_write_time(struct share_mode_lock *lck)
+{
+ struct share_mode_data *d = lck->data;
+
+ if (!null_timespec(d->changed_write_time)) {
+ return d->changed_write_time;
+ }
+ return d->old_write_time;
+}
bool is_delete_on_close_set(struct share_mode_lock *lck, uint32_t name_hash);
bool set_sticky_write_time(struct file_id fileid, struct timespec write_time);
bool set_write_time(struct file_id fileid, struct timespec write_time);
+struct timespec get_share_mode_write_time(struct share_mode_lock *lck);
int share_mode_forall(void (*fn)(const struct share_mode_entry *, const char *,
const char *, void *),
void *private_data);