export->exp_connection = ptlrpc_get_connection(&req->rq_peer, cluuid);
if (req->rq_connection != NULL)
ptlrpc_put_connection(req->rq_connection);
- req->rq_connection = export->exp_connection;
+ req->rq_connection = ptlrpc_connection_addref(export->exp_connection);
spin_lock(&export->exp_connection->c_lock);
list_add(&export->exp_conn_chain, &export->exp_connection->c_exports);
struct ldlm_extent extent;
struct lustre_handle *lockhs = NULL;
int rc, flags = 0, stripe_count;
+ ENTRY;
if (sbi->ll_flags & LL_SBI_NOLCK) {
*lockhs_p = NULL;
{
struct ll_sb_info *sbi = ll_i2sbi(inode);
int rc, stripe_count;
+ ENTRY;
if (sbi->ll_flags & LL_SBI_NOLCK)
RETURN(0);
struct lustre_handle *lockhs;
struct obdo oa;
int err, rc;
+ ENTRY;
+
+ LASSERT(lsm);
+ LASSERT(sbi);
rc = ll_size_lock(inode, lsm, 0, LCK_PR, &lockhs);
if (rc != ELDLM_OK) {
spin_unlock(&exp->exp_obd->obd_dev_lock);
/* XXXshaver no connection here... */
- if (exp->exp_connection) spin_lock(&exp->exp_connection->c_lock);
+ if (exp->exp_connection)
+ spin_lock(&exp->exp_connection->c_lock);
list_del(&exp->exp_conn_chain);
- if (exp->exp_connection) spin_unlock(&exp->exp_connection->c_lock);
+ if (exp->exp_connection) {
+ spin_unlock(&exp->exp_connection->c_lock);
+ ptlrpc_put_connection(exp->exp_connection);
+ }
kmem_cache_free(export_cachep, exp);