Commit 8060c901 authored by Dmitry Eremin's avatar Dmitry Eremin Committed by Greg Kroah-Hartman

staging: lustre: lu_dirent_calc_size() return type to size_t

Change the type accordant usage.
Signed-off-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577
Reviewed-on: http://review.whamcloud.com/12383Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarJames Simmons <uja.ornl@gmail.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6f508397
......@@ -1013,12 +1013,12 @@ static inline struct lu_dirent *lu_dirent_next(struct lu_dirent *ent)
return next;
}
static inline int lu_dirent_calc_size(int namelen, __u16 attr)
static inline size_t lu_dirent_calc_size(size_t namelen, __u16 attr)
{
int size;
size_t size;
if (attr & LUDA_TYPE) {
const unsigned align = sizeof(struct luda_type) - 1;
const size_t align = sizeof(struct luda_type) - 1;
size = (sizeof(struct lu_dirent) + namelen + align) & ~align;
size += sizeof(struct luda_type);
......@@ -1029,15 +1029,6 @@ static inline int lu_dirent_calc_size(int namelen, __u16 attr)
return (size + 7) & ~7;
}
static inline int lu_dirent_size(const struct lu_dirent *ent)
{
if (le16_to_cpu(ent->lde_reclen) == 0) {
return lu_dirent_calc_size(le16_to_cpu(ent->lde_namelen),
le32_to_cpu(ent->lde_attrs));
}
return le16_to_cpu(ent->lde_reclen);
}
#define MDS_DIR_END_OFF 0xfffffffffffffffeULL
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment