summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Eremin <dmitry.eremin@intel.com>2016-09-18 16:38:03 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-19 09:44:04 +0200
commit8060c90186ec2d609b3ef3b2799e22f5a82ae55d (patch)
treef350e864c53b2a2a124626e5b4f2330d9f01329e
parent6f5083978b71b83849e8937e722ef41d0849a398 (diff)
downloadlinux-8060c90186ec2d609b3ef3b2799e22f5a82ae55d.tar.bz2
staging: lustre: lu_dirent_calc_size() return type to size_t
Change the type accordant usage. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/12383 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/include/lustre/lustre_idl.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index a0ca571e456c..445b81313347 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -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
/**