diff options
author | Volker Lendecke <vl@samba.org> | 2013-11-22 14:36:49 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-11-22 13:30:27 -0800 |
commit | 80e6ca56258f436df07fcfea6854cf653d5f3f0d (patch) | |
tree | d77dd042cf789282321cb723feeede8d3371aac2 /source3/locking/locking.c | |
parent | cb353a34dd0ed4475ab13037689a41eced7f791d (diff) | |
download | samba-80e6ca56258f436df07fcfea6854cf653d5f3f0d.tar.gz samba-80e6ca56258f436df07fcfea6854cf653d5f3f0d.tar.xz samba-80e6ca56258f436df07fcfea6854cf653d5f3f0d.zip |
smbd: Factor out get_share_mode_write_time of get_file_infos
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/locking/locking.c')
-rw-r--r-- | source3/locking/locking.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c index b5d4f24f34..54c92b1470 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -600,14 +600,7 @@ void get_file_infos(struct file_id id, } 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); @@ -1088,3 +1081,13 @@ bool set_write_time(struct file_id fileid, struct timespec write_time) 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; +} |