From 268458a5d94692136c2b4085f2e5e4b5781ae64f Mon Sep 17 00:00:00 2001 From: jxiong Date: Fri, 21 Aug 2009 02:06:36 +0000 Subject: [PATCH] b=19211 r=fanyong,vitaly Removed a duplicate md_lock_set_data which happened after the ldlm reference count has been released. --- lustre/llite/file.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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)); -- 1.8.3.1