From: Bobi Jam Date: Sat, 24 Aug 2019 17:20:23 +0000 (+0800) Subject: LU-12690 llite: error handling of ll_och_fill() X-Git-Tag: 2.12.90~99 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=4d6d58575d3d957aa3dbf38f83f749259b580bf2;p=fs%2Flustre-release.git LU-12690 llite: error handling of ll_och_fill() The return error of ll_och_fill() should be handled. Signed-off-by: Bobi Jam Change-Id: I4e750001cb124104836fa24e39ec8ae203b51a83 Reviewed-on: https://review.whamcloud.com/35913 Reviewed-by: Patrick Farrell Reviewed-by: Andreas Dilger Tested-by: jenkins Reviewed-by: Mike Pershin Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index d288209..a4da041 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -1066,7 +1066,9 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode, GOTO(out_release_it, rc); LASSERT(it_disposition(&it, DISP_ENQ_OPEN_REF)); - ll_och_fill(sbi->ll_md_exp, &it, och); + rc = ll_och_fill(sbi->ll_md_exp, &it, och); + if (rc) + GOTO(out_release_it, rc); if (!it_disposition(&it, DISP_OPEN_LEASE)) /* old server? */ GOTO(out_close, rc = -EOPNOTSUPP); @@ -2392,7 +2394,9 @@ int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it) if (!och) GOTO(out, rc = -ENOMEM); - ll_och_fill(ll_i2sbi(inode)->ll_md_exp, it, och); + rc = ll_och_fill(ll_i2sbi(inode)->ll_md_exp, it, och); + if (rc) + GOTO(out, rc); rc = ll_close_inode_openhandle(inode, och, 0, NULL); out: