summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-02-19 14:23:56 +0100
committerVolker Lendecke <vl@samba.org>2012-02-19 17:44:26 +0100
commite5c84840737692b6c445e4ed316d869f6d0394bf (patch)
tree8f891a860d0736a0686b1e76cc13cb36db4bf8e1 /source3/smbd
parentda84242f5b91858b0df9ace9c565dd2a53d4998a (diff)
downloadsamba-e5c84840737692b6c445e4ed316d869f6d0394bf.tar.gz
samba-e5c84840737692b6c445e4ed316d869f6d0394bf.tar.bz2
samba-e5c84840737692b6c445e4ed316d869f6d0394bf.zip
s3: get_share_mode_lock->get_existing_share_mode_lock
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/close.c6
-rw-r--r--source3/smbd/open.c3
-rw-r--r--source3/smbd/oplock.c6
-rw-r--r--source3/smbd/reply.c2
-rw-r--r--source3/smbd/trans2.c2
5 files changed, 10 insertions, 9 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 42e88d82ea..1a123b49c8 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -347,7 +347,7 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
* This prevents race conditions with the file being created. JRA.
*/
- lck = get_share_mode_lock(talloc_tos(), fsp->file_id);
+ lck = get_existing_share_mode_lock(talloc_tos(), fsp->file_id);
if (lck == NULL) {
DEBUG(0, ("close_remove_share_mode: Could not get share mode "
"lock for file %s\n", fsp_str_dbg(fsp)));
@@ -615,7 +615,7 @@ static NTSTATUS update_write_time_on_close(struct files_struct *fsp)
* must update it in the open file db too. */
(void)set_write_time(fsp->file_id, fsp->close_write_time);
- lck = get_share_mode_lock(talloc_tos(), fsp->file_id);
+ lck = get_existing_share_mode_lock(talloc_tos(), fsp->file_id);
if (lck) {
/* Close write times overwrite sticky write times
so we must replace any sticky write time here. */
@@ -1017,7 +1017,7 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
* reference to a directory also.
*/
- lck = get_share_mode_lock(talloc_tos(), fsp->file_id);
+ lck = get_existing_share_mode_lock(talloc_tos(), fsp->file_id);
if (lck == NULL) {
DEBUG(0, ("close_directory: Could not get share mode lock for "
"%s\n", fsp_str_dbg(fsp)));
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index daa9bb9188..ed3ef90f16 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1594,7 +1594,8 @@ NTSTATUS smbd_calculate_access_mask(connection_struct *conn,
void remove_deferred_open_entry(struct file_id id, uint64_t mid,
struct server_id pid)
{
- struct share_mode_lock *lck = get_share_mode_lock(talloc_tos(), id);
+ struct share_mode_lock *lck = get_existing_share_mode_lock(
+ talloc_tos(), id);
if (lck == NULL) {
DEBUG(0, ("could not get share mode lock\n"));
return;
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index 0c4155d9d6..f760171c3a 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -162,7 +162,7 @@ bool remove_oplock(files_struct *fsp)
struct share_mode_lock *lck;
/* Remove the oplock flag from the sharemode. */
- lck = get_share_mode_lock(talloc_tos(), fsp->file_id);
+ lck = get_existing_share_mode_lock(talloc_tos(), fsp->file_id);
if (lck == NULL) {
DEBUG(0,("remove_oplock: failed to lock share entry for "
"file %s\n", fsp_str_dbg(fsp)));
@@ -188,7 +188,7 @@ bool downgrade_oplock(files_struct *fsp)
bool ret;
struct share_mode_lock *lck;
- lck = get_share_mode_lock(talloc_tos(), fsp->file_id);
+ lck = get_existing_share_mode_lock(talloc_tos(), fsp->file_id);
if (lck == NULL) {
DEBUG(0,("downgrade_oplock: failed to lock share entry for "
"file %s\n", fsp_str_dbg(fsp)));
@@ -804,7 +804,7 @@ static void do_break_to_none(struct tevent_req *req)
DEBUG(1, ("tevent_wakeup_recv failed\n"));
goto done;
}
- lck = get_share_mode_lock(talloc_tos(), state->id);
+ lck = get_existing_share_mode_lock(talloc_tos(), state->id);
if (lck == NULL) {
DEBUG(1, ("release_level_2_oplocks_on_change: failed to lock "
"share mode entry for file %s.\n",
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index b026d34c67..eebd77d3ef 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -6205,7 +6205,7 @@ NTSTATUS rename_internals_fsp(connection_struct *conn,
status = NT_STATUS_ACCESS_DENIED;
}
- lck = get_share_mode_lock(talloc_tos(), fsp->file_id);
+ lck = get_existing_share_mode_lock(talloc_tos(), fsp->file_id);
/*
* We have the file open ourselves, so not being able to get the
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 336e76e481..d2eff4d8f5 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -7565,7 +7565,7 @@ static NTSTATUS smb_posix_unlink(connection_struct *conn,
* non-POSIX opens return SHARING_VIOLATION.
*/
- lck = get_share_mode_lock(talloc_tos(), fsp->file_id);
+ lck = get_existing_share_mode_lock(talloc_tos(), fsp->file_id);
if (lck == NULL) {
DEBUG(0, ("smb_posix_unlink: Could not get share mode "
"lock for file %s\n", fsp_str_dbg(fsp)));