From patchwork Thu Jan 7 05:36:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 7973601 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1F70BBEEE5 for ; Thu, 7 Jan 2016 05:39:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF2A920149 for ; Thu, 7 Jan 2016 05:39:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 902DD2010E for ; Thu, 7 Jan 2016 05:39:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752013AbcAGFjU (ORCPT ); Thu, 7 Jan 2016 00:39:20 -0500 Received: from mail-pa0-f67.google.com ([209.85.220.67]:33006 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751545AbcAGFhA (ORCPT ); Thu, 7 Jan 2016 00:37:00 -0500 Received: by mail-pa0-f67.google.com with SMTP id pv5so20291959pac.0; Wed, 06 Jan 2016 21:36:59 -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=hKG1zTl02+PiCk6L9qKWrNFPdEYfMceyKsVbokxP1wM=; b=lgw+CCd4tydPS8mNfv6ppmf8Z2Pzb0YcQh5AuosfPJri9vX7oJJNkpEeD63CONKW/P Xogol9ttxVkHIMoc682iW9cu2o5ySCZhmoxoIh1Ht4NqRbmByLfQs8DlpROjdxf2PymF iiO6NHqfzzG3NB+3yxQTtZ4ZlWIQi9XiL8JQAxWu0EVFdOhu/433kc8t+Wv6pqE/In0i 7kjgtpwSsevI68/RznhqIzCvIby3YQBVDbKlkKA3t/86bGc8k1QWAOkBNLXs5hyD49H8 Q0W5E4aqlYrobDSKXXMOMr2Xc8zKkT7lTe+xAavUcf5PMNZghkxf3tVm6a6BXWvhHEvH mQ/g== X-Received: by 10.66.190.7 with SMTP id gm7mr89136404pac.79.1452145019679; Wed, 06 Jan 2016 21:36:59 -0800 (PST) Received: from localhost.localdomain ([106.51.24.71]) by smtp.gmail.com with ESMTPSA id kk5sm131390736pab.16.2016.01.06.21.36.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jan 2016 21:36:59 -0800 (PST) From: Deepa Dinamani To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org Subject: [RFC 10/15] fs: fat: replace inode_timespec with timespec64 Date: Wed, 6 Jan 2016 21:36:07 -0800 Message-Id: <1452144972-15802-11-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/fat/dir.c | 4 ++-- fs/fat/fat.h | 6 +++--- fs/fat/file.c | 4 ++-- fs/fat/inode.c | 12 ++++++------ fs/fat/misc.c | 4 ++-- fs/fat/namei_msdos.c | 8 ++++---- fs/fat/namei_vfat.c | 14 +++++++------- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/fs/fat/dir.c b/fs/fat/dir.c index fa8a922..683f973 100644 --- a/fs/fat/dir.c +++ b/fs/fat/dir.c @@ -1034,7 +1034,7 @@ int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo) struct super_block *sb = dir->i_sb; struct msdos_dir_entry *de; struct buffer_head *bh; - struct inode_timespec now; + struct timespec64 now; int err = 0, nr_slots; /* @@ -1133,7 +1133,7 @@ error: return err; } -int fat_alloc_new_dir(struct inode *dir, struct inode_timespec *ts) +int fat_alloc_new_dir(struct inode *dir, struct timespec64 *ts) { struct super_block *sb = dir->i_sb; struct msdos_sb_info *sbi = MSDOS_SB(sb); diff --git a/fs/fat/fat.h b/fs/fat/fat.h index cabb0fd..859626a 100644 --- a/fs/fat/fat.h +++ b/fs/fat/fat.h @@ -303,7 +303,7 @@ extern int fat_scan_logstart(struct inode *dir, int i_logstart, struct fat_slot_info *sinfo); extern int fat_get_dotdot_entry(struct inode *dir, struct buffer_head **bh, struct msdos_dir_entry **de); -extern int fat_alloc_new_dir(struct inode *dir, struct inode_timespec *ts); +extern int fat_alloc_new_dir(struct inode *dir, struct timespec64 *ts); extern int fat_add_entries(struct inode *dir, void *slots, int nr_slots, struct fat_slot_info *sinfo); extern int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo); @@ -406,10 +406,10 @@ void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...); extern int fat_clusters_flush(struct super_block *sb); extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); extern void fat_time_fat2unix(struct msdos_sb_info *sbi, - struct inode_timespec *ts, + struct timespec64 *ts, __le16 __time, __le16 __date, u8 time_cs); extern void fat_time_unix2fat(struct msdos_sb_info *sbi, - struct inode_timespec *ts, + struct timespec64 *ts, __le16 *time, __le16 *date, u8 *time_cs); extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); diff --git a/fs/fat/file.c b/fs/fat/file.c index e7f060f..48c985d 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c @@ -188,7 +188,7 @@ static int fat_cont_expand(struct inode *inode, loff_t size) { struct address_space *mapping = inode->i_mapping; loff_t start = inode->i_size, count = size - inode->i_size; - struct inode_timespec ts; + struct timespec64 ts; int err; err = generic_cont_expand_simple(inode, size); @@ -283,7 +283,7 @@ error: static int fat_free(struct inode *inode, int skip) { struct super_block *sb = inode->i_sb; - struct inode_timespec ts; + struct timespec64 ts; int err, wait, free_start, i_start, i_logstart; if (MSDOS_I(inode)->i_start == 0) diff --git a/fs/fat/inode.c b/fs/fat/inode.c index a1eba05..03a8fa0 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -232,7 +232,7 @@ static int fat_write_end(struct file *file, struct address_space *mapping, struct page *pagep, void *fsdata) { struct inode *inode = mapping->host; - struct inode_timespec ts; + struct timespec64 ts; int err; err = generic_write_end(file, mapping, pos, len, copied, pagep, fsdata); if (err < len) @@ -505,7 +505,7 @@ static int fat_validate_dir(struct inode *dir) int fat_fill_inode(struct inode *inode, struct msdos_dir_entry *de) { struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); - struct inode_timespec mtime, ctime, atime; + struct timespec64 mtime, ctime, atime; int error; MSDOS_I(inode)->i_pos = 0; @@ -840,7 +840,7 @@ static int __fat_write_inode(struct inode *inode, int wait) struct msdos_sb_info *sbi = MSDOS_SB(sb); struct buffer_head *bh; struct msdos_dir_entry *raw_entry; - struct inode_timespec ts; + struct timespec64 ts; loff_t i_pos; sector_t blocknr; int err, offset; @@ -1402,9 +1402,9 @@ static int fat_read_root(struct inode *inode) MSDOS_I(inode)->mmu_private = inode->i_size; fat_save_attrs(inode, ATTR_DIR); - VFS_INODE_SET_XTIME(i_atime, inode, ((struct inode_timespec) {0, 0})); - VFS_INODE_SET_XTIME(i_mtime, inode, ((struct inode_timespec) {0, 0})); - VFS_INODE_SET_XTIME(i_ctime, inode, ((struct inode_timespec) {0, 0})); + VFS_INODE_SET_XTIME(i_atime, inode, ((struct timespec64) {0, 0})); + VFS_INODE_SET_XTIME(i_mtime, inode, ((struct timespec64) {0, 0})); + VFS_INODE_SET_XTIME(i_ctime, inode, ((struct timespec64) {0, 0})); set_nlink(inode, fat_subdirs(inode)+2); return 0; diff --git a/fs/fat/misc.c b/fs/fat/misc.c index 1544498..3ed5fbd 100644 --- a/fs/fat/misc.c +++ b/fs/fat/misc.c @@ -186,7 +186,7 @@ static time_t days_in_year[] = { }; /* Convert a FAT time/date pair to a UNIX date (seconds since 1 1 70). */ -void fat_time_fat2unix(struct msdos_sb_info *sbi, struct inode_timespec *ts, +void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec64 *ts, __le16 __time, __le16 __date, u8 time_cs) { u16 time = le16_to_cpu(__time), date = le16_to_cpu(__date); @@ -225,7 +225,7 @@ void fat_time_fat2unix(struct msdos_sb_info *sbi, struct inode_timespec *ts, } /* Convert linear UNIX date to a FAT time/date pair. */ -void fat_time_unix2fat(struct msdos_sb_info *sbi, struct inode_timespec *ts, +void fat_time_unix2fat(struct msdos_sb_info *sbi, struct timespec64 *ts, __le16 *time, __le16 *date, u8 *time_cs) { struct tm tm; diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c index 457dcfb..faa1274 100644 --- a/fs/fat/namei_msdos.c +++ b/fs/fat/namei_msdos.c @@ -224,7 +224,7 @@ static struct dentry *msdos_lookup(struct inode *dir, struct dentry *dentry, /***** Creates a directory entry (name is already formatted). */ static int msdos_add_entry(struct inode *dir, const unsigned char *name, int is_dir, int is_hid, int cluster, - struct inode_timespec *ts, + struct timespec64 *ts, struct fat_slot_info *sinfo) { struct msdos_sb_info *sbi = MSDOS_SB(dir->i_sb); @@ -267,7 +267,7 @@ static int msdos_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct super_block *sb = dir->i_sb; struct inode *inode = NULL; struct fat_slot_info sinfo; - struct inode_timespec ts; + struct timespec64 ts; unsigned char msdos_name[MSDOS_NAME]; int err, is_hid; @@ -351,7 +351,7 @@ static int msdos_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) struct fat_slot_info sinfo; struct inode *inode; unsigned char msdos_name[MSDOS_NAME]; - struct inode_timespec ts; + struct timespec64 ts; int err, is_hid, cluster; mutex_lock(&MSDOS_SB(sb)->s_lock); @@ -442,7 +442,7 @@ static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name, struct inode *old_inode, *new_inode; struct super_block *sb = old_dir->i_sb; struct fat_slot_info old_sinfo, sinfo; - struct inode_timespec ts; + struct timespec64 ts; loff_t new_i_pos; int err, old_attrs, is_dir, update_dotdot, corrupt = 0; diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index 31da5b6..84c309d 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c @@ -577,7 +577,7 @@ xlate_to_uni(const unsigned char *name, int len, unsigned char *outname, static int vfat_build_slots(struct inode *dir, const unsigned char *name, int len, int is_dir, int cluster, - struct inode_timespec *ts, + struct timespec64 *ts, struct msdos_dir_slot *slots, int *nr_slots) { struct msdos_sb_info *sbi = MSDOS_SB(dir->i_sb); @@ -653,7 +653,7 @@ out_free: } static int vfat_add_entry(struct inode *dir, struct qstr *qname, int is_dir, - int cluster, struct inode_timespec *ts, + int cluster, struct timespec64 *ts, struct fat_slot_info *sinfo) { struct msdos_dir_slot *slots; @@ -774,7 +774,7 @@ static int vfat_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct super_block *sb = dir->i_sb; struct inode *inode; struct fat_slot_info sinfo; - struct inode_timespec ts; + struct timespec64 ts; int err; mutex_lock(&MSDOS_SB(sb)->s_lock); @@ -808,7 +808,7 @@ static int vfat_rmdir(struct inode *dir, struct dentry *dentry) struct inode *inode = d_inode(dentry); struct super_block *sb = dir->i_sb; struct fat_slot_info sinfo; - struct inode_timespec now; + struct timespec64 now; int err; mutex_lock(&MSDOS_SB(sb)->s_lock); @@ -842,7 +842,7 @@ static int vfat_unlink(struct inode *dir, struct dentry *dentry) struct inode *inode = d_inode(dentry); struct super_block *sb = dir->i_sb; struct fat_slot_info sinfo; - struct inode_timespec now; + struct timespec64 now; int err; mutex_lock(&MSDOS_SB(sb)->s_lock); @@ -871,7 +871,7 @@ static int vfat_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) struct super_block *sb = dir->i_sb; struct inode *inode; struct fat_slot_info sinfo; - struct inode_timespec ts; + struct timespec64 ts; int err, cluster; mutex_lock(&MSDOS_SB(sb)->s_lock); @@ -921,7 +921,7 @@ static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry, struct msdos_dir_entry *dotdot_de; struct inode *old_inode, *new_inode; struct fat_slot_info old_sinfo, sinfo; - struct inode_timespec ts; + struct timespec64 ts; loff_t new_i_pos; int err, is_dir, update_dotdot, corrupt = 0; struct super_block *sb = old_dir->i_sb;