Whamcloud - gitweb
LU-12690 llite: error handling of ll_och_fill() 15/36315/2
authorBobi Jam <bobijam@whamcloud.com>
Sat, 24 Aug 2019 17:20:23 +0000 (01:20 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 4 Oct 2019 20:31:23 +0000 (20:31 +0000)
The return error of ll_och_fill() should be handled.

Lustre-change: https://review.whamcloud.com/35913
Lustre-commit: 4d6d58575d3d957aa3dbf38f83f749259b580bf2

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I4e750001cb124104836fa24e39ec8ae203b51a83
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/36315
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/file.c

index 623d5b9..9d43de0 100644 (file)
@@ -1024,7 +1024,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);
@@ -2246,7 +2248,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: