mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 18:53:52 +08:00
drbd: lc_element_by_index() never returns NULL
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
61917bdaaf
commit
b2b163dd47
@ -1336,7 +1336,7 @@ int drbd_rs_del_all(struct drbd_conf *mdev)
|
||||
/* ok, ->resync is there. */
|
||||
for (i = 0; i < mdev->resync->nr_elements; i++) {
|
||||
e = lc_element_by_index(mdev->resync, i);
|
||||
bm_ext = e ? lc_entry(e, struct bm_extent, lce) : NULL;
|
||||
bm_ext = lc_entry(e, struct bm_extent, lce);
|
||||
if (bm_ext->lce.lc_number == LC_FREE)
|
||||
continue;
|
||||
if (bm_ext->lce.lc_number == mdev->resync_wenr) {
|
||||
|
Loading…
Reference in New Issue
Block a user