* to access the 'ent' through its 'lde_name',
* so the parameter 'name' for 'filldir()' must
* be part of the 'ent'. */
+#ifdef HAVE_DIR_CONTEXT
+ ctx->pos = lhash;
+ done = !dir_emit(ctx, ent->lde_name, namelen, ino,
+ type);
+#else
done = filldir(cookie, ent->lde_name, namelen, lhash,
ino, type);
+#endif
}
if (done) {
&chain);
}
}
-
+#ifdef HAVE_DIR_CONTEXT
+ ctx->pos = pos;
+#else
*ppos = pos;
+#endif
ll_dir_chain_fini(&chain);
RETURN(rc);
}
RETURN(ll_fid2path(inode, (void *)arg));
case LL_IOC_HSM_REQUEST: {
struct hsm_user_request *hur;
- int totalsize;
+ ssize_t totalsize;
OBD_ALLOC_PTR(hur);
if (hur == NULL)
/* Compute the whole struct size */
totalsize = hur_len(hur);
OBD_FREE_PTR(hur);
+ if (totalsize < 0)
+ RETURN(-E2BIG);
/* Final size will be more than double totalsize */
if (totalsize >= MDS_MAXREQSIZE / 3)