diff --git a/include/uapi/linux/lustre/lustre_idl.h b/include/uapi/linux/lustre/lustre_idl.h index 599fe86..4236a43 100644 --- a/include/uapi/linux/lustre/lustre_idl.h +++ b/include/uapi/linux/lustre/lustre_idl.h @@ -480,10 +480,11 @@ static inline size_t lu_dirent_calc_size(size_t namelen, __u16 attr) if (attr & LUDA_TYPE) { const size_t align = sizeof(struct luda_type) - 1; - size = (sizeof(struct lu_dirent) + namelen + align) & ~align; + size = (sizeof(struct lu_dirent) + namelen + 1 + align) & + ~align; size += sizeof(struct luda_type); } else { - size = sizeof(struct lu_dirent) + namelen; + size = sizeof(struct lu_dirent) + namelen + 1; } return (size + 7) & ~7;