diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2019-06-05 16:24:24 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2019-06-27 20:53:46 +0200 |
commit | 15a798f7deb3931dd569f5734a04be47b97435cc (patch) | |
tree | 78a348db6da5b7cf580344414cd07e261f7689b4 /fs/gfs2/dir.c | |
parent | gfs2: Clean up freeing struct gfs2_sbd (diff) | |
download | linux-15a798f7deb3931dd569f5734a04be47b97435cc.tar.xz linux-15a798f7deb3931dd569f5734a04be47b97435cc.zip |
gfs2: Use IS_ERR_OR_NULL
Use IS_ERR_OR_NULL where appropriate.
(Several more places converted by Andreas.)
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 88e4f955c518..6f35d19eec25 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -750,7 +750,7 @@ static struct gfs2_dirent *gfs2_dirent_split_alloc(struct inode *inode, struct gfs2_dirent *dent; dent = gfs2_dirent_scan(inode, bh->b_data, bh->b_size, gfs2_dirent_find_offset, name, ptr); - if (!dent || IS_ERR(dent)) + if (IS_ERR_OR_NULL(dent)) return dent; return do_init_dirent(inode, dent, name, bh, (unsigned)(ptr - (void *)dent)); @@ -854,7 +854,7 @@ static struct gfs2_dirent *gfs2_dirent_search(struct inode *inode, return ERR_PTR(error); dent = gfs2_dirent_scan(inode, bh->b_data, bh->b_size, scan, name, NULL); got_dent: - if (unlikely(dent == NULL || IS_ERR(dent))) { + if (IS_ERR_OR_NULL(dent)) { brelse(bh); bh = NULL; } |