From: jxiong Date: Fri, 21 Aug 2009 02:06:36 +0000 (+0000) Subject: b=19211 X-Git-Tag: v1_9_250~20 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=268458a5d94692136c2b4085f2e5e4b5781ae64f;p=fs%2Flustre-release.git b=19211 r=fanyong,vitaly Removed a duplicate md_lock_set_data which happened after the ldlm reference count has been released. --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index c5d6702..8a05635 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -387,12 +387,12 @@ static int ll_intent_file_open(struct file *file, void *lmm, GOTO(out, rc); } - if (itp->d.lustre.it_lock_mode) + rc = ll_prep_inode(&file->f_dentry->d_inode, req, NULL); + if (!rc && itp->d.lustre.it_lock_mode) md_set_lock_data(sbi->ll_md_exp, &itp->d.lustre.it_lock_handle, file->f_dentry->d_inode, NULL); - rc = ll_prep_inode(&file->f_dentry->d_inode, req, NULL); out: ptlrpc_req_finished(itp->d.lustre.it_data); it_clear_disposition(itp, DISP_ENQ_COMPLETE); @@ -604,9 +604,6 @@ restart: req = it->d.lustre.it_data; ptlrpc_req_finished(req); } - md_set_lock_data(ll_i2sbi(inode)->ll_md_exp, - &it->d.lustre.it_lock_handle, - file->f_dentry->d_inode, NULL); goto restart; } OBD_ALLOC(*och_p, sizeof (struct obd_client_handle));