aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.c
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2019-06-05 10:24:24 -0400
committerAndreas Gruenbacher <agruenba@redhat.com>2019-06-27 14:53:46 -0400
commit15a798f7deb3931dd569f5734a04be47b97435cc (patch)
tree78a348db6da5b7cf580344414cd07e261f7689b4 /fs/gfs2/dir.c
parent2a27b755ed244527df845f07f4dd83988a90f2e4 (diff)
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.c4
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,
750 struct gfs2_dirent *dent; 750 struct gfs2_dirent *dent;
751 dent = gfs2_dirent_scan(inode, bh->b_data, bh->b_size, 751 dent = gfs2_dirent_scan(inode, bh->b_data, bh->b_size,
752 gfs2_dirent_find_offset, name, ptr); 752 gfs2_dirent_find_offset, name, ptr);
753 if (!dent || IS_ERR(dent)) 753 if (IS_ERR_OR_NULL(dent))
754 return dent; 754 return dent;
755 return do_init_dirent(inode, dent, name, bh, 755 return do_init_dirent(inode, dent, name, bh,
756 (unsigned)(ptr - (void *)dent)); 756 (unsigned)(ptr - (void *)dent));
@@ -854,7 +854,7 @@ static struct gfs2_dirent *gfs2_dirent_search(struct inode *inode,
854 return ERR_PTR(error); 854 return ERR_PTR(error);
855 dent = gfs2_dirent_scan(inode, bh->b_data, bh->b_size, scan, name, NULL); 855 dent = gfs2_dirent_scan(inode, bh->b_data, bh->b_size, scan, name, NULL);
856got_dent: 856got_dent:
857 if (unlikely(dent == NULL || IS_ERR(dent))) { 857 if (IS_ERR_OR_NULL(dent)) {
858 brelse(bh); 858 brelse(bh);
859 bh = NULL; 859 bh = NULL;
860 } 860 }