summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-03-01 14:28:22 +0100
committerVolker Lendecke <vl@samba.org>2010-03-01 14:51:34 +0100
commit8bebb380e8b581b41f3057c128d73094c1bde332 (patch)
tree3470aabb76b4800f32ef85a13f6f53936a9e261e /source3/smbd
parent3deba6349ca751d669e2af817ec7e2c7eb6195b3 (diff)
downloadsamba-8bebb380e8b581b41f3057c128d73094c1bde332.tar.gz
samba-8bebb380e8b581b41f3057c128d73094c1bde332.tar.bz2
samba-8bebb380e8b581b41f3057c128d73094c1bde332.zip
s3: Add connections_forall_read()
In a cluster, this makes a large difference: For r/w traverse, we have to do a fetch_locked on every record which for most users of connections_forall is just overkill.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/sesssetup.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 289055cc6b..cad2dd33b8 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -1356,8 +1356,7 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
a new session setup with VC==0 is ignored.
****************************************************************************/
-static int shutdown_other_smbds(struct db_record *rec,
- const struct connections_key *key,
+static int shutdown_other_smbds(const struct connections_key *key,
const struct connections_data *crec,
void *private_data)
{
@@ -1394,7 +1393,7 @@ static void setup_new_vc_session(void)
invalidate_all_vuids();
#endif
if (lp_reset_on_zero_vc()) {
- connections_forall(shutdown_other_smbds,
+ connections_forall_read(shutdown_other_smbds,
CONST_DISCARD(void *,
client_addr(get_client_fd(),addr,sizeof(addr))));
}