From patchwork Thu Jan 7 05:36:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 7973621 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9B6CC9F1CC for ; Thu, 7 Jan 2016 05:40:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 910A520149 for ; Thu, 7 Jan 2016 05:40:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 54A732012D for ; Thu, 7 Jan 2016 05:40:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752806AbcAGFjr (ORCPT ); Thu, 7 Jan 2016 00:39:47 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33827 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752262AbcAGFg6 (ORCPT ); Thu, 7 Jan 2016 00:36:58 -0500 Received: by mail-pa0-f47.google.com with SMTP id uo6so231278737pac.1; Wed, 06 Jan 2016 21:36:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=gXOJhIO3mLV9G5Awwp51DoHE2DOx4IMuNef4lRMnC2o=; b=a+p3s0IYMpL0X2OaYMz9bN2rD8upMI53U1BCDH+nmifXwyiu7Q8obmUsJFfT2nNK/O +DQUw0MwiLScQzZ/8Ajhdm8ZpM0JSUy4PPh3gw0GgBp8QaTf5f3f96W9umM1OuHars9Z /SrQCC/FqqwahL0HwzQZ7zjUZUmjZf30dntNBiEu9ZbBSbVeDCjUFChGbGXLtetqEEHc QQHZArYT5z21PWaiSoY98py5po8HaskdwYpV97l0SKGAn8hNiPOebM/2D/3bbEJ08PgQ DvOaKLkLGiZt6dVAo70vC/uC4Fp4zlIbZ3cerG2Rdtm53G4abzomY+LQr4o/BI0ipbJz UQ5A== X-Received: by 10.66.250.165 with SMTP id zd5mr74627212pac.9.1452145017775; Wed, 06 Jan 2016 21:36:57 -0800 (PST) Received: from localhost.localdomain ([106.51.24.71]) by smtp.gmail.com with ESMTPSA id kk5sm131390736pab.16.2016.01.06.21.36.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jan 2016 21:36:57 -0800 (PST) From: Deepa Dinamani To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org Subject: [RFC 09/15] fs: cifs: replace inode_timespec with timespec64 Date: Wed, 6 Jan 2016 21:36:06 -0800 Message-Id: <1452144972-15802-10-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452144972-15802-1-git-send-email-deepa.kernel@gmail.com> References: <1452144972-15802-1-git-send-email-deepa.kernel@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SBL_CSS, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Substitute inode_timespec aliases with timespec64. Since CONFIG_FS_USES_64BIT_TIME is enabled, internally all inode_timespec references are using timespec64 already. Signed-off-by: Deepa Dinamani --- fs/cifs/cache.c | 4 ++-- fs/cifs/cifsglob.h | 6 +++--- fs/cifs/cifsproto.h | 6 +++--- fs/cifs/cifssmb.c | 4 ++-- fs/cifs/file.c | 2 +- fs/cifs/inode.c | 12 ++++++------ fs/cifs/netmisc.c | 10 +++++----- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/fs/cifs/cache.c b/fs/cifs/cache.c index 8d27e69b..61c21bf 100644 --- a/fs/cifs/cache.c +++ b/fs/cifs/cache.c @@ -221,8 +221,8 @@ const struct fscache_cookie_def cifs_fscache_super_index_def = { * Auxiliary data attached to CIFS inode within the cache */ struct cifs_fscache_inode_auxdata { - struct inode_timespec last_write_time; - struct inode_timespec last_change_time; + struct timespec64 last_write_time; + struct timespec64 last_change_time; u64 eof; }; diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index c95dce7..7dfb0e2 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -1393,9 +1393,9 @@ struct cifs_fattr { dev_t cf_rdev; unsigned int cf_nlink; unsigned int cf_dtype; - struct inode_timespec cf_atime; - struct inode_timespec cf_mtime; - struct inode_timespec cf_ctime; + struct timespec64 cf_atime; + struct timespec64 cf_mtime; + struct timespec64 cf_ctime; }; static inline void free_dfs_info_param(struct dfs_info3_param *param) diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 9979c74..663b8a4 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h @@ -126,10 +126,10 @@ extern enum securityEnum select_sectype(struct TCP_Server_Info *server, enum securityEnum requested); extern int CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses, const struct nls_table *nls_cp); -extern struct inode_timespec +extern struct timespec64 cifs_NTtimeToUnix(__le64 utc_nanoseconds_since_1601); -extern u64 cifs_UnixTimeToNT(struct inode_timespec); -extern struct inode_timespec cnvrtDosUnixTm(__le16 le_date, __le16 le_time, +extern u64 cifs_UnixTimeToNT(struct timespec64); +extern struct timespec64 cnvrtDosUnixTm(__le16 le_date, __le16 le_time, int offset); extern void cifs_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock); extern int cifs_get_writer(struct cifsInodeInfo *cinode); diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index a813bcd..465e089 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -478,7 +478,7 @@ decode_lanman_negprot_rsp(struct TCP_Server_Info *server, NEGOTIATE_RSP *pSMBr) * this requirement. */ int val, seconds, remain, result; - struct inode_timespec ts, utc; + struct timespec64 ts, utc; utc = FS_TIME; ts = cnvrtDosUnixTm(rsp->SrvTime.Date, @@ -4004,7 +4004,7 @@ QInfRetry: if (rc) { cifs_dbg(FYI, "Send error in QueryInfo = %d\n", rc); } else if (data) { - struct inode_timespec ts; + struct timespec64 ts; __u32 time = le32_to_cpu(pSMBr->last_write_time); diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 2d226cf..656e799 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -1839,7 +1839,7 @@ static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to) int bytes_written = 0; struct inode *inode; struct cifsFileInfo *open_file; - struct inode_timespec now; + struct timespec64 now; if (!mapping || !mapping->host) return -EFAULT; diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index bb91bf7..c65d7e3 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -92,7 +92,7 @@ static void cifs_revalidate_cache(struct inode *inode, struct cifs_fattr *fattr) { struct cifsInodeInfo *cifs_i = CIFS_I(inode); - struct inode_timespec mtime; + struct timespec64 mtime; cifs_dbg(FYI, "%s: revalidating inode %llu\n", __func__, cifs_i->uniqueid); @@ -112,7 +112,7 @@ cifs_revalidate_cache(struct inode *inode, struct cifs_fattr *fattr) /* revalidate if mtime or size have changed */ mtime = VFS_INODE_GET_XTIME(i_mtime, inode); - if (inode_timespec_equal(&mtime, &fattr->cf_mtime) + if (timespec64_equal(&mtime, &fattr->cf_mtime) && cifs_i->server_eof == fattr->cf_eof) { cifs_dbg(FYI, "%s: inode %llu is unchanged\n", __func__, cifs_i->uniqueid); @@ -320,7 +320,7 @@ static void cifs_create_dfs_fattr(struct cifs_fattr *fattr, struct super_block *sb) { struct cifs_sb_info *cifs_sb = CIFS_SB(sb); - struct inode_timespec now; + struct timespec64 now; cifs_dbg(FYI, "creating fake fattr for DFS referral\n"); @@ -1261,7 +1261,7 @@ int cifs_unlink(struct inode *dir, struct dentry *dentry) unsigned int xid; char *full_path = NULL; struct inode *inode = d_inode(dentry); - struct inode_timespec now; + struct timespec64 now; struct cifsInodeInfo *cifs_inode; struct super_block *sb = dir->i_sb; struct cifs_sb_info *cifs_sb = CIFS_SB(sb); @@ -1577,7 +1577,7 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) struct TCP_Server_Info *server; char *full_path = NULL; struct cifsInodeInfo *cifsInode; - struct inode_timespec now; + struct timespec64 now; cifs_dbg(FYI, "cifs_rmdir, inode = 0x%p\n", inode); @@ -1707,7 +1707,7 @@ cifs_rename2(struct inode *source_dir, struct dentry *source_dentry, struct cifs_tcon *tcon; FILE_UNIX_BASIC_INFO *info_buf_source = NULL; FILE_UNIX_BASIC_INFO *info_buf_target; - struct inode_timespec now; + struct timespec64 now; unsigned int xid; int rc, tmprc; diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c index 4a26260..bb1570f 100644 --- a/fs/cifs/netmisc.c +++ b/fs/cifs/netmisc.c @@ -918,10 +918,10 @@ smbCalcSize(void *buf) * Convert the NT UTC (based 1601-01-01, in hundred nanosecond units) * into Unix UTC (based 1970-01-01, in seconds). */ -struct inode_timespec +struct timespec64 cifs_NTtimeToUnix(__le64 ntutc) { - struct inode_timespec ts; + struct timespec64 ts; /* BB what about the timezone? BB */ /* Subtract the NTFS time offset, then convert to 1s intervals. */ @@ -949,7 +949,7 @@ cifs_NTtimeToUnix(__le64 ntutc) /* Convert the Unix UTC into NT UTC. */ u64 -cifs_UnixTimeToNT(struct inode_timespec t) +cifs_UnixTimeToNT(struct timespec64 t) { /* Convert to 100ns intervals and then add the NTFS time offset. */ return (u64) t.tv_sec * 10000000 + t.tv_nsec/100 + NTFS_TIME_OFFSET; @@ -959,9 +959,9 @@ static const int total_days_of_prev_months[] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; -struct inode_timespec cnvrtDosUnixTm(__le16 le_date, __le16 le_time, int offset) +struct timespec64 cnvrtDosUnixTm(__le16 le_date, __le16 le_time, int offset) { - struct inode_timespec ts; + struct timespec64 ts; unsigned long long sec; unsigned int min, days, month, year; u16 date = le16_to_cpu(le_date);