diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 5d4261ff5d23..9291cf5e7439 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -764,7 +764,7 @@ static int get_first_leaf(struct gfs2_inode *dip, u32 index, int error; error = get_leaf_nr(dip, index, &leaf_no); - if (!error) + if (!IS_ERR_VALUE(error)) error = get_leaf(dip, leaf_no, bh_out); return error; @@ -980,7 +980,7 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name) index = name->hash >> (32 - dip->i_depth); error = get_leaf_nr(dip, index, &leaf_no); - if (error) + if (IS_ERR_VALUE(error)) return error; /* Get the old leaf block */