Messages in this thread Patch in this message | | | From | Kefeng Wang <> | Subject | [PATCH] fs: gfs2: Use IS_ERR_OR_NULL | Date | Wed, 5 Jun 2019 22:24:24 +0800 |
| |
Use IS_ERR_OR_NULL where appropriate.
Cc: Bob Peterson <rpeterso@redhat.com> Cc: Andreas Gruenbacher <agruenba@redhat.com> Cc: cluster-devel@redhat.com Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- fs/gfs2/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index db9a05244a35..3925efd3fd83 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -857,7 +857,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; } -- 2.20.1
| |