Whamcloud - gitweb
b=16605 don't LASSERT on unverified client data in filter_parent
authorAndreas Dilger <andreas.dilger@oracle.com>
Thu, 16 Dec 2010 17:36:38 +0000 (20:36 +0300)
committerAndrew Perepechko <andrew.perepechko@oracle.com>
Thu, 16 Dec 2010 17:36:38 +0000 (20:36 +0300)
i=Johann Lombardi
i=Andrew Perepechko

lustre/obdfilter/filter.c

index 050de74..3dbd107 100644 (file)
@@ -1349,7 +1349,9 @@ static int filter_lock_dentry(struct obd_device *obd, struct dentry *dparent)
 struct dentry *filter_parent(struct obd_device *obd, obd_gr group, obd_id objid)
 {
         struct filter_obd *filter = &obd->u.filter;
-        LASSERT(group < FILTER_GROUPS); /* FIXME: object groups */
+
+        if (group >= FILTER_GROUPS) /* FIXME: object groups */
+               return ERR_PTR(-EBADF);
 
         if (group > 0 || filter->fo_subdir_count == 0)
                 return filter->fo_dentry_O_groups[group];