-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2012, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
ks_get_tconn(tconn);
- cfs_spin_lock(&tconn->kstc_lock);
+ spin_lock(&tconn->kstc_lock);
if (tconn->kstc_type == kstt_sender) {
nagle = tconn->sender.kstc_info.nagle;
tconn->sender.kstc_info.nagle = 0;
tconn->child.kstc_info.nagle = 0;
}
- cfs_spin_unlock(&tconn->kstc_lock);
+ spin_unlock(&tconn->kstc_lock);
val = 1;
rc = ks_set_tcp_option(
);
LASSERT (rc == 0);
- cfs_spin_lock(&tconn->kstc_lock);
-
- if (tconn->kstc_type == kstt_sender) {
- tconn->sender.kstc_info.nagle = nagle;
- } else {
- LASSERT(tconn->kstc_type == kstt_child);
- tconn->child.kstc_info.nagle = nagle;
- }
- cfs_spin_unlock(&tconn->kstc_lock);
+ spin_lock(&tconn->kstc_lock);
+
+ if (tconn->kstc_type == kstt_sender) {
+ tconn->sender.kstc_info.nagle = nagle;
+ } else {
+ LASSERT(tconn->kstc_type == kstt_child);
+ tconn->child.kstc_info.nagle = nagle;
+ }
+ spin_unlock(&tconn->kstc_lock);
ks_put_tconn(tconn);
}
{
ksock_conn_t * conn = (ksock_conn_t *) sock->kstc_conn;
- cfs_read_lock (&ksocknal_data.ksnd_global_lock);
+ read_lock(&ksocknal_data.ksnd_global_lock);
if (mode) {
ksocknal_write_callback(conn);
} else {
ksocknal_read_callback(conn);
}
- cfs_read_unlock (&ksocknal_data.ksnd_global_lock);
+ read_unlock(&ksocknal_data.ksnd_global_lock);
}
void
ksocknal_tx_fini_callback(ksock_conn_t * conn, ksock_tx_t * tx)
{
- /* remove tx/conn from conn's outgoing queue */
- cfs_spin_lock_bh (&conn->ksnc_scheduler->kss_lock);
- cfs_list_del(&tx->tx_list);
- if (cfs_list_empty(&conn->ksnc_tx_queue)) {
- cfs_list_del (&conn->ksnc_tx_list);
- }
- cfs_spin_unlock_bh (&conn->ksnc_scheduler->kss_lock);
+ /* remove tx/conn from conn's outgoing queue */
+ spin_lock_bh(&conn->ksnc_scheduler->kss_lock);
+ cfs_list_del(&tx->tx_list);
+ if (cfs_list_empty(&conn->ksnc_tx_queue))
+ cfs_list_del(&conn->ksnc_tx_list);
+
+ spin_unlock_bh(&conn->ksnc_scheduler->kss_lock);
- /* complete send; tx -ref */
- ksocknal_tx_decref (tx);
+ /* complete send; tx -ref */
+ ksocknal_tx_decref(tx);
}
void