diff mbox

[RFC,09/15] fs: cifs: replace inode_timespec with timespec64

Message ID 1452144972-15802-10-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/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 mbox

Patch

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);