The branch, master has been updated via 32cbf20 Move the set_write_time() call to after get_existing_share_mode_lock() returns with a share mode. via 87a62df Raise the debug level from 1 to 5 in get_share_mode_lock_internal() from 5c219a1 s4:torture: Add raw.session.reauth2 test
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 32cbf20e65578b3d5e71d571d81d561f33a887e2 Author: Jeremy Allison <j...@samba.org> Date: Fri May 18 19:29:36 2012 -0700 Move the set_write_time() call to after get_existing_share_mode_lock() returns with a share mode. get_existing_share_mode_lock() isn't really the right call here, as we're being called after close_remove_share_mode() inside close_normal_file() so it's quite normal to not have an existing share mode here. However, get_share_mode_lock() doesn't work because that will create a new share mode if one doesn't exist - so stick with this call (just ignore any error we get if the share mode doesn't exist. The previous commit raised the error message debug level inside get_share_mode_lock_internal() so we don't always get a level 1 error message if get_existing_share_mode_lock() fails. Autobuild-User: Jeremy Allison <j...@samba.org> Autobuild-Date: Sat May 19 06:26:33 CEST 2012 on sn-devel-104 commit 87a62df8e69bfd45c944f44fb7d03da244dc9a44 Author: Jeremy Allison <j...@samba.org> Date: Fri May 18 19:24:51 2012 -0700 Raise the debug level from 1 to 5 in get_share_mode_lock_internal() This isn't a fatal condition, there is a valid codepath that can cause this message. ----------------------------------------------------------------------- Summary of changes: source3/locking/share_mode_lock.c | 3 ++- source3/smbd/close.c | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index f28332c..493bc15 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -355,7 +355,8 @@ static struct share_mode_lock *get_share_mode_lock_internal( } if (d == NULL) { - DEBUG(1, ("Could not get share mode lock\n")); + DEBUG(5, ("get_share_mode_lock_internal: " + "Could not get share mode lock\n")); TALLOC_FREE(rec); return NULL; } diff --git a/source3/smbd/close.c b/source3/smbd/close.c index c87b1a0..ede7925 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -616,12 +616,24 @@ static NTSTATUS update_write_time_on_close(struct files_struct *fsp) return NT_STATUS_OK; } - /* On close if we're changing the real file time we - * must update it in the open file db too. */ - (void)set_write_time(fsp->file_id, fsp->close_write_time); + /* + * get_existing_share_mode_lock() isn't really the right + * call here, as we're being called after + * close_remove_share_mode() inside close_normal_file() + * so it's quite normal to not have an existing share + * mode here. However, get_share_mode_lock() doesn't + * work because that will create a new share mode if + * one doesn't exist - so stick with this call (just + * ignore any error we get if the share mode doesn't + * exist. + */ lck = get_existing_share_mode_lock(talloc_tos(), fsp->file_id); if (lck) { + /* On close if we're changing the real file time we + * must update it in the open file db too. */ + (void)set_write_time(fsp->file_id, fsp->close_write_time); + /* Close write times overwrite sticky write times so we must replace any sticky write time here. */ if (!null_timespec(lck->data->changed_write_time)) { -- Samba Shared Repository