-struct dlm_direntry *allocate_direntry(struct dlm_ls *ls, int namelen)
-{
- struct dlm_direntry *de;
-
- DLM_ASSERT(namelen <= DLM_RESNAME_MAXLEN,);
-
- de = kmalloc(sizeof(*de) + namelen, GFP_KERNEL);
- if (de)
- memset(de, 0, sizeof(*de) + namelen);
- return de;
-}
-
-void free_direntry(struct dlm_direntry *de)
-{
- kfree(de);
-}
-