i=green
i=liang
another bh lock is added just to protect exp_queued_rpc in the export
cfs_list_t exp_req_replay_queue;
/** protects exp_flags and exp_outstanding_replies */
cfs_spinlock_t exp_lock;
cfs_list_t exp_req_replay_queue;
/** protects exp_flags and exp_outstanding_replies */
cfs_spinlock_t exp_lock;
+ /** protects exp_queued_rpc */
+ cfs_spinlock_t exp_rpc_lock;
/** Compatibility flags for this export */
__u64 exp_connect_flags;
enum obd_option exp_flags;
/** Compatibility flags for this export */
__u64 exp_connect_flags;
enum obd_option exp_flags;
if (lock->l_export == NULL)
return 0;
if (lock->l_export == NULL)
return 0;
- cfs_spin_lock(&lock->l_export->exp_lock);
+ cfs_spin_lock_bh(&lock->l_export->exp_rpc_lock);
cfs_list_for_each_entry(req, &lock->l_export->exp_queued_rpc,
rq_exp_list) {
if (req->rq_ops->hpreq_lock_match) {
cfs_list_for_each_entry(req, &lock->l_export->exp_queued_rpc,
rq_exp_list) {
if (req->rq_ops->hpreq_lock_match) {
- cfs_spin_unlock(&lock->l_export->exp_lock);
+ cfs_spin_unlock_bh(&lock->l_export->exp_rpc_lock);
- cfs_spin_lock(&lock->l_export->exp_lock);
+ cfs_spin_lock_bh(&lock->l_export->exp_rpc_lock);
cfs_list_for_each_entry(req, &lock->l_export->exp_queued_rpc,
rq_exp_list) {
if (!req->rq_hp && req->rq_ops->hpreq_lock_match &&
req->rq_ops->hpreq_lock_match(req, lock))
ptlrpc_hpreq_reorder(req);
}
cfs_list_for_each_entry(req, &lock->l_export->exp_queued_rpc,
rq_exp_list) {
if (!req->rq_hp && req->rq_ops->hpreq_lock_match &&
req->rq_ops->hpreq_lock_match(req, lock))
ptlrpc_hpreq_reorder(req);
}
- cfs_spin_unlock(&lock->l_export->exp_lock);
+ cfs_spin_unlock_bh(&lock->l_export->exp_rpc_lock);
class_handle_hash(&export->exp_handle, export_handle_addref);
export->exp_last_request_time = cfs_time_current_sec();
cfs_spin_lock_init(&export->exp_lock);
class_handle_hash(&export->exp_handle, export_handle_addref);
export->exp_last_request_time = cfs_time_current_sec();
cfs_spin_lock_init(&export->exp_lock);
+ cfs_spin_lock_init(&export->exp_rpc_lock);
CFS_INIT_HLIST_NODE(&export->exp_uuid_hash);
CFS_INIT_HLIST_NODE(&export->exp_nid_hash);
CFS_INIT_HLIST_NODE(&export->exp_uuid_hash);
CFS_INIT_HLIST_NODE(&export->exp_nid_hash);
RETURN(rc);
}
if (req->rq_export && req->rq_ops) {
RETURN(rc);
}
if (req->rq_export && req->rq_ops) {
- cfs_spin_lock(&req->rq_export->exp_lock);
+ cfs_spin_lock_bh(&req->rq_export->exp_rpc_lock);
cfs_list_add(&req->rq_exp_list,
&req->rq_export->exp_queued_rpc);
cfs_list_add(&req->rq_exp_list,
&req->rq_export->exp_queued_rpc);
- cfs_spin_unlock(&req->rq_export->exp_lock);
+ cfs_spin_unlock_bh(&req->rq_export->exp_rpc_lock);
{
ENTRY;
if (req->rq_export && req->rq_ops) {
{
ENTRY;
if (req->rq_export && req->rq_ops) {
- cfs_spin_lock(&req->rq_export->exp_lock);
+ cfs_spin_lock_bh(&req->rq_export->exp_rpc_lock);
cfs_list_del_init(&req->rq_exp_list);
cfs_list_del_init(&req->rq_exp_list);
- cfs_spin_unlock(&req->rq_export->exp_lock);
+ cfs_spin_unlock_bh(&req->rq_export->exp_rpc_lock);