diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index 624d713482eaad19e55af18a163dac52744d9792..20e58ff9f2c1b1263473c718be781fb717f4c285 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -752,7 +752,7 @@ extern lnet_pid_t ptl_get_pid(void); /* ptlrpc/niobuf.c */ int ptlrpc_start_bulk_transfer(struct ptlrpc_bulk_desc *desc); -void ptlrpc_abort_bulk(struct ptlrpc_request *req); +void ptlrpc_abort_bulk(struct ptlrpc_bulk_desc *desc); int ptlrpc_register_bulk(struct ptlrpc_request *req); int ptlrpc_unregister_bulk(struct ptlrpc_request *req, int async); diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c index 60d6cc29dd13c1dee78d9c7d2b61cc618165da77..fd55f77b5dd180f9601e3cc5235f1a0ce7c710db 100644 --- a/lustre/ldlm/ldlm_request.c +++ b/lustre/ldlm/ldlm_request.c @@ -360,9 +360,8 @@ static void failed_lock_cleanup(struct ldlm_namespace *ns, /* XXX - HACK because we shouldn't call ldlm_lock_destroy() * from llite/file.c/ll_file_flock(). */ - if (lock->l_resource->lr_type == LDLM_FLOCK) { + if (lock->l_resource->lr_type == LDLM_FLOCK) ldlm_lock_destroy(lock); - } } int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index cfed97733b1699666a617b2c19b2e6b914031387..4599cb5bc1fb4a5a4cbc3a567a777e1f126b4121 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -168,7 +168,7 @@ static int mds_sendpage(struct ptlrpc_request *req, struct file *file, EXIT; abort_bulk: - ptlrpc_abort_bulk(req); + ptlrpc_abort_bulk(desc); cleanup_buf: for (i = 0; i < npages; i++) if (pages[i]) diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 8b1e34c5cfe28637389e3fb9a72a23711f1aecb4..4e7cee04088d2de912288c97849d5f247e011267 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -890,11 +890,11 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti) req->rq_deadline - start, cfs_time_current_sec() - req->rq_deadline); - ptlrpc_abort_bulk(req); + ptlrpc_abort_bulk(desc); } else if (exp->exp_failed) { DEBUG_REQ(D_ERROR, req, "Eviction on bulk PUT"); rc = -ENOTCONN; - ptlrpc_abort_bulk(req); + ptlrpc_abort_bulk(desc); } else if (!desc->bd_success || desc->bd_nob_transferred != desc->bd_nob) { DEBUG_REQ(D_ERROR, req, "%s bulk PUT %d(%d)", @@ -1122,11 +1122,11 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti) req->rq_deadline - start, cfs_time_current_sec() - req->rq_deadline); - ptlrpc_abort_bulk(req); + ptlrpc_abort_bulk(desc); } else if (desc->bd_export->exp_failed) { DEBUG_REQ(D_ERROR, req, "Eviction on bulk GET"); rc = -ENOTCONN; - ptlrpc_abort_bulk(req); + ptlrpc_abort_bulk(desc); } else if (!desc->bd_success || desc->bd_nob_transferred != desc->bd_nob) { DEBUG_REQ(D_ERROR, req, "%s bulk GET %d(%d)", diff --git a/lustre/ptlrpc/niobuf.c b/lustre/ptlrpc/niobuf.c index eedbb41749410c2f0de59609a35b41800f744c5c..613ef6f8060f945f80449c276dc80545073db254 100644 --- a/lustre/ptlrpc/niobuf.c +++ b/lustre/ptlrpc/niobuf.c @@ -166,15 +166,14 @@ int ptlrpc_start_bulk_transfer(struct ptlrpc_bulk_desc *desc) /* Server side bulk abort. Idempotent. Not thread-safe (i.e. only * serialises with completion callback) */ -void ptlrpc_abort_bulk(struct ptlrpc_request *req) +void ptlrpc_abort_bulk(struct ptlrpc_bulk_desc *desc) { - struct ptlrpc_bulk_desc *desc = req->rq_bulk; struct l_wait_info lwi; int rc; LASSERT(!in_interrupt()); /* might sleep */ - if (!ptlrpc_client_bulk_active(req)) /* completed or */ + if (!ptlrpc_server_bulk_active(desc)) /* completed or */ return; /* never started */ /* Do not send any meaningful data over the wire for evicted clients */ @@ -194,7 +193,7 @@ void ptlrpc_abort_bulk(struct ptlrpc_request *req) lwi = LWI_TIMEOUT_INTERVAL(cfs_time_seconds(LONG_UNLINK), cfs_time_seconds(1), NULL, NULL); rc = l_wait_event(desc->bd_waitq, - !ptlrpc_client_bulk_active(req), &lwi); + !ptlrpc_server_bulk_active(desc), &lwi); if (rc == 0) return;