Encode is used for iattr times, inode times and current filesystem times. Decode is mostly used for inode times. Hence, these need to use vfs_time to switch to 64 bit times along with vfs.
Decode is also used for keepalive times and processing authentication tickets. Since inode times also use same functions it is necessary to use vfs_time here as well.
Signed-off-by: Deepa Dinamani deepa.kernel@gmail.com --- include/linux/ceph/decode.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h index 633a130..8139ed9 100644 --- a/include/linux/ceph/decode.h +++ b/include/linux/ceph/decode.h @@ -4,6 +4,7 @@ #include <linux/err.h> #include <linux/bug.h> #include <linux/time.h> +#include <linux/fs.h> #include <asm/unaligned.h>
#include <linux/ceph/types.h> @@ -132,16 +133,16 @@ bad: }
/* - * struct ceph_timespec <-> struct timespec + * struct ceph_timespec <-> struct vfs_time */ -static inline void ceph_decode_timespec(struct timespec *ts, +static inline void ceph_decode_timespec(struct vfs_time *ts, const struct ceph_timespec *tv) { - ts->tv_sec = (__kernel_time_t)le32_to_cpu(tv->tv_sec); - ts->tv_nsec = (long)le32_to_cpu(tv->tv_nsec); + ts->tv_sec = (s64)(u32)le32_to_cpu(tv->tv_sec); + ts->tv_nsec = (long)(u32)le32_to_cpu(tv->tv_nsec); } static inline void ceph_encode_timespec(struct ceph_timespec *tv, - const struct timespec *ts) + const struct vfs_time *ts) { tv->tv_sec = cpu_to_le32((u32)ts->tv_sec); tv->tv_nsec = cpu_to_le32((u32)ts->tv_nsec);