op_data = ll_prep_md_op_data(NULL, dir, dir, NULL, 0, 0,
LUSTRE_OPC_ANY, dir);
- if (IS_ERR(op_data))
- return PTR_ERR(op_data);
+ if (IS_ERR(op_data)) {
+ rc = PTR_ERR(op_data);
+ goto out_put;
+ }
op_data->op_max_pages = ll_i2sbi(dir)->ll_md_brw_pages;
}
}
out:
+ ll_dir_chain_fini(&chain);
ll_finish_md_op_data(op_data);
+out_put:
if (sai->sai_agl_valid) {
spin_lock(&plli->lli_agl_lock);
thread_set_flags(agl_thread, SVC_STOPPING);
/* Set agl_thread flags anyway. */
thread_set_flags(&sai->sai_agl_thread, SVC_STOPPED);
}
- ll_dir_chain_fini(&chain);
spin_lock(&plli->lli_sa_lock);
if (!list_empty(&sai->sai_entries_received)) {
thread_set_flags(thread, SVC_STOPPING);
wake_up(&sai->sai_waitq);
wake_up(&thread->t_ctl_waitq);
ll_sai_put(sai);
- dput(parent);
CDEBUG(D_READA, "statahead thread stopped: sai %p, parent %pd\n",
sai, parent);
+ dput(parent);
return rc;
}