diff mbox

[RFC,10/15] fs: fat: replace inode_timespec with timespec64

Message ID 1452144972-15802-11-git-send-email-deepa.kernel@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Deepa Dinamani Jan. 7, 2016, 5:36 a.m. UTC
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 <deepa.kernel@gmail.com>
---
 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 mbox

Patch

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;