Avoid trying to access an invalid/unknown group sent from the client.
Don't return -EINVAL, since it is possible that the problem is the OST
code is old and this object actually exists. Instead, return -EBADF
so that we can more easily diagnose this problem.
{
struct filter_obd *filter = &obd->u.filter;
struct filter_subdirs *subdirs;
- LASSERT(group < filter->fo_group_count); /* FIXME: object groups */
+
+ if (group >= filter->fo_group_count) /* FIXME: object groups */
+ return ERR_PTR(-EBADF);
if (!fid_seq_is_mdt(group) || filter->fo_subdir_count == 0)
return filter->fo_dentry_O_groups[group];