diff options
author | Volker Lendecke <vl@samba.org> | 2013-09-11 11:54:37 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-10-06 22:20:05 +0200 |
commit | c952e11859d786418f82204e6cabc6c424e71bb9 (patch) | |
tree | 2bbd50c14d1cd0b76ff4b7123616b95a9e696d92 | |
parent | 8c435cd588bd15f444eb4d2fcd687eee02204c88 (diff) | |
download | samba-c952e11859d786418f82204e6cabc6c424e71bb9.tar.gz samba-c952e11859d786418f82204e6cabc6c424e71bb9.tar.bz2 samba-c952e11859d786418f82204e6cabc6c424e71bb9.zip |
smbd: Remove byte_range_lock->read_only
With the rewritten brl_get_lock_readonly we only set the destructor for
r/w lock records anyway.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Oct 6 22:20:05 CEST 2013 on sn-devel-104
-rw-r--r-- | source3/locking/brlock.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index 78315bc7f9..0d45501453 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -47,7 +47,6 @@ struct byte_range_lock { struct files_struct *fsp; unsigned int num_locks; bool modified; - bool read_only; struct lock_struct *lock_data; struct db_record *record; }; @@ -1879,10 +1878,6 @@ int brl_forall(void (*fn)(struct file_id id, struct server_id pid, static void byte_range_lock_flush(struct byte_range_lock *br_lck) { - if (br_lck->read_only) { - SMB_ASSERT(!br_lck->modified); - } - if (!br_lck->modified) { goto done; } @@ -1910,10 +1905,7 @@ static void byte_range_lock_flush(struct byte_range_lock *br_lck) } done: - - br_lck->read_only = true; br_lck->modified = false; - TALLOC_FREE(br_lck->record); } @@ -1961,7 +1953,6 @@ struct byte_range_lock *brl_get_locks(TALLOC_CTX *mem_ctx, files_struct *fsp) return NULL; } - br_lck->read_only = false; br_lck->lock_data = NULL; talloc_set_destructor(br_lck, byte_range_lock_destructor); @@ -2119,7 +2110,6 @@ struct byte_range_lock *brl_get_locks_readonly(files_struct *fsp) br_lock->fsp = fsp; br_lock->modified = false; - br_lock->read_only = true; br_lock->record = NULL; if (lp_clustering()) { |