diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-04-02 02:40:33 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-04-02 02:40:33 -0400 |
commit | b2b163dd47024e445410b72d0c5df6d819c14dfd (patch) | |
tree | 587717f64b0c52c7b56de1f44a89843d9a2f08d9 | |
parent | 61917bdaaf6bea4b885525cf63f65272914f6be2 (diff) |
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>
-rw-r--r-- | drivers/block/drbd/drbd_actlog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index 43e57f395fd6..df018990c422 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c | |||
@@ -1336,7 +1336,7 @@ int drbd_rs_del_all(struct drbd_conf *mdev) | |||
1336 | /* ok, ->resync is there. */ | 1336 | /* ok, ->resync is there. */ |
1337 | for (i = 0; i < mdev->resync->nr_elements; i++) { | 1337 | for (i = 0; i < mdev->resync->nr_elements; i++) { |
1338 | e = lc_element_by_index(mdev->resync, i); | 1338 | e = lc_element_by_index(mdev->resync, i); |
1339 | bm_ext = e ? lc_entry(e, struct bm_extent, lce) : NULL; | 1339 | bm_ext = lc_entry(e, struct bm_extent, lce); |
1340 | if (bm_ext->lce.lc_number == LC_FREE) | 1340 | if (bm_ext->lce.lc_number == LC_FREE) |
1341 | continue; | 1341 | continue; |
1342 | if (bm_ext->lce.lc_number == mdev->resync_wenr) { | 1342 | if (bm_ext->lce.lc_number == mdev->resync_wenr) { |