From 4d6d58575d3d957aa3dbf38f83f749259b580bf2 Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Sun, 25 Aug 2019 01:20:23 +0800 Subject: [PATCH] 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 --- lustre/llite/file.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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: -- 1.8.3.1