Skip to content

Commit

Permalink
dm block manager: remove redundant unlikely annotation
Browse files Browse the repository at this point in the history
unlikely has already included in IS_ERR(),
so just remove redundant unlikely annotation.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Chengguang Xu authored and Mike Snitzer committed Mar 5, 2019
1 parent 821b40d commit 5941c62
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/md/persistent-data/dm-block-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ int dm_bm_read_lock(struct dm_block_manager *bm, dm_block_t b,
int r;

p = dm_bufio_read(bm->bufio, b, (struct dm_buffer **) result);
if (unlikely(IS_ERR(p)))
if (IS_ERR(p))
return PTR_ERR(p);

aux = dm_bufio_get_aux_data(to_buffer(*result));
Expand Down Expand Up @@ -498,7 +498,7 @@ int dm_bm_write_lock(struct dm_block_manager *bm,
return -EPERM;

p = dm_bufio_read(bm->bufio, b, (struct dm_buffer **) result);
if (unlikely(IS_ERR(p)))
if (IS_ERR(p))
return PTR_ERR(p);

aux = dm_bufio_get_aux_data(to_buffer(*result));
Expand Down Expand Up @@ -531,7 +531,7 @@ int dm_bm_read_try_lock(struct dm_block_manager *bm,
int r;

p = dm_bufio_get(bm->bufio, b, (struct dm_buffer **) result);
if (unlikely(IS_ERR(p)))
if (IS_ERR(p))
return PTR_ERR(p);
if (unlikely(!p))
return -EWOULDBLOCK;
Expand Down Expand Up @@ -567,7 +567,7 @@ int dm_bm_write_lock_zero(struct dm_block_manager *bm,
return -EPERM;

p = dm_bufio_new(bm->bufio, b, (struct dm_buffer **) result);
if (unlikely(IS_ERR(p)))
if (IS_ERR(p))
return PTR_ERR(p);

memset(p, 0, dm_bm_block_size(bm));
Expand Down

0 comments on commit 5941c62

Please sign in to comment.