Whamcloud - gitweb
LU-2728 fld: check for NULL param in fldb_seq_stop()
authorJohn L. Hammond <john.hammond@intel.com>
Fri, 1 Feb 2013 01:51:04 +0000 (19:51 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 5 Feb 2013 21:39:56 +0000 (16:39 -0500)
Check for NULL param in fldb_seq_stop().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I44ed10f9ce8bceabb203e6ef0b843b23340ced2b
Reviewed-on: http://review.whamcloud.com/5238
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/fld/lproc_fld.c

index 1629e86..52d517f 100644 (file)
@@ -189,13 +189,15 @@ static void fldb_seq_stop(struct seq_file *p, void *v)
        struct lu_server_fld    *fld;
        struct dt_object        *obj;
 
        struct lu_server_fld    *fld;
        struct dt_object        *obj;
 
+       if (param == NULL)
+               return;
+
        fld = param->fsp_fld;
        obj = fld->lsf_obj;
        LASSERT(obj != NULL);
        iops = &obj->do_index_ops->dio_it;
 
        iops->put(&param->fsp_env, param->fsp_it);
        fld = param->fsp_fld;
        obj = fld->lsf_obj;
        LASSERT(obj != NULL);
        iops = &obj->do_index_ops->dio_it;
 
        iops->put(&param->fsp_env, param->fsp_it);
-       return;
 }
 
 static void *fldb_seq_next(struct seq_file *p, void *v, loff_t *pos)
 }
 
 static void *fldb_seq_next(struct seq_file *p, void *v, loff_t *pos)