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:
Родитель
61917bdaaf
Коммит
b2b163dd47
|
@ -1336,7 +1336,7 @@ int drbd_rs_del_all(struct drbd_conf *mdev)
|
||||||
/* ok, ->resync is there. */
|
/* ok, ->resync is there. */
|
||||||
for (i = 0; i < mdev->resync->nr_elements; i++) {
|
for (i = 0; i < mdev->resync->nr_elements; i++) {
|
||||||
e = lc_element_by_index(mdev->resync, 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)
|
if (bm_ext->lce.lc_number == LC_FREE)
|
||||||
continue;
|
continue;
|
||||||
if (bm_ext->lce.lc_number == mdev->resync_wenr) {
|
if (bm_ext->lce.lc_number == mdev->resync_wenr) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче