From a793ac016db95290470515d89c187365bfcb4f18 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 22 Nov 2013 16:24:42 +0000 Subject: smbd: Pull mtime handling into open_file_ntcreate This is a performance improvement for heavily contended files, in particular in a cluster. The separate call to get_file_infos makes us pull the locking.tdb record twice per open. For a contended file this can be a performance penalty, this gets the # of record accesses for the open/close cycle down from 3 to 2. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Sat Nov 23 00:40:49 CET 2013 on sn-devel-104 --- source3/smbd/reply.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'source3/smbd/reply.c') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index c11c318ef9..87bda99411 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1967,18 +1967,6 @@ void reply_open(struct smb_request *req) size = smb_fname->st.st_ex_size; fattr = dos_mode(conn, smb_fname); - /* Deal with other possible opens having a modified - write time. JRA. */ - if (ask_sharemode) { - struct timespec write_time_ts; - - ZERO_STRUCT(write_time_ts); - get_file_infos(fsp->file_id, 0, NULL, &write_time_ts); - if (!null_timespec(write_time_ts)) { - update_stat_ex_mtime(&smb_fname->st, write_time_ts); - } - } - mtime = convert_timespec_to_time_t(smb_fname->st.st_ex_mtime); if (fattr & FILE_ATTRIBUTE_DIRECTORY) { -- cgit