From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751987AbcBLJhV (ORCPT ); Fri, 12 Feb 2016 04:37:21 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:34445 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750995AbcBLJhN (ORCPT ); Fri, 12 Feb 2016 04:37:13 -0500 From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org Cc: Arnd Bergmann , Dave Chinner , "Theodore Ts'o" , linux-kernel@vger.kernel.org Subject: [RFC v2a 09/12] fs: ceph: Change encode and decode functions to use vfs_time Date: Fri, 12 Feb 2016 01:36:03 -0800 Message-Id: <1455269766-2994-10-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455269766-2994-1-git-send-email-deepa.kernel@gmail.com> References: <20160212092153.GA2368@deepa-ubuntu> <1455269766-2994-1-git-send-email-deepa.kernel@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 #include #include +#include #include #include @@ -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); -- 1.9.1