lkml.org 
[lkml]   [2017]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 08/10] staging: lustre: lov: use list_for_each_entry in lov_obd.c
Signed-off-by: NeilBrown <neilb@suse.com>
---
drivers/staging/lustre/lustre/lov/lov_obd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c
index fefd3c588681..7e013229d7b5 100644
--- a/drivers/staging/lustre/lustre/lov/lov_obd.c
+++ b/drivers/staging/lustre/lustre/lov/lov_obd.c
@@ -827,11 +827,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

\
 
 \ /
  Last update: 2017-10-30 06:01    [W:0.072 / U:3.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site