From b6943e0a116c626dcdab652a7656234d1b21dda0 Mon Sep 17 00:00:00 2001 From: bobijam Date: Thu, 4 Sep 2008 02:18:41 +0000 Subject: [PATCH] Branch b1_8_gate b=16561 i=Oleg Drokin (green) i=johann Description: Hitting mdc_commit_close() ASSERTION Details : Properly handle request reference release in ll_release_openhandle(). --- lustre/llite/file.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index db9f1e6..d35d736 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -2447,6 +2447,15 @@ cleanup: RETURN(rc); } +/** + * Close inode open handle + * + * \param dentry [in] dentry which contains the inode + * \param it [in,out] intent which contains open info and result + * + * \retval 0 success + * \retval <0 failure + */ int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it) { struct inode *inode = dentry->d_inode; @@ -2477,8 +2486,10 @@ int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it) OBD_FREE(och, sizeof(*och)); out: /* this one is in place of ll_file_open */ - ptlrpc_req_finished(it->d.lustre.it_data); - it_clear_disposition(it, DISP_ENQ_OPEN_REF); + if (it_disposition(it, DISP_ENQ_OPEN_REF)) { + ptlrpc_req_finished(it->d.lustre.it_data); + it_clear_disposition(it, DISP_ENQ_OPEN_REF); + } RETURN(rc); } -- 1.8.3.1