Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47d59e75 authored by NeilBrown's avatar NeilBrown Committed by Greg Kroah-Hartman
Browse files

staging: lustre: lov: use list_for_each_entry in lov_obd.c



Using the *_entry macro simplifies the code slightly.

Signed-off-by: default avatarNeilBrown <neilb@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5eb50608
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -828,11 +828,9 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
static int lov_cleanup(struct obd_device *obd)
{
	struct lov_obd *lov = &obd->u.lov;
	struct list_head *pos, *tmp;
	struct pool_desc *pool;
	struct pool_desc *pool, *tmp;

	list_for_each_safe(pos, tmp, &lov->lov_pool_list) {
		pool = list_entry(pos, struct pool_desc, pool_list);
	list_for_each_entry_safe(pool, tmp, &lov->lov_pool_list, pool_list) {
		/* free pool structs */
		CDEBUG(D_INFO, "delete pool %p\n", pool);
		/* In the function below, .hs_keycmp resolves to