summaryrefslogtreecommitdiff
path: root/fs/ubifs/sb.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-07-13 16:31:55 +0200
committerRichard Weinberger <richard@nod.at>2018-08-15 00:06:16 +0200
commit0eca0b8067c4dfa405e38abb4c3a87b1df14513c (patch)
treeec8817cef892b81324debc4a18e49e9cd000bd4f /fs/ubifs/sb.c
parent11a6fc3dc743e22fb50f2196ec55bee5140d3c52 (diff)
ubifs: use timespec64 for inode timestamps
Both vfs and the on-disk inode structures can deal with fine-grained timestamps now, so this is the last missing piece to make ubifs y2038-safe on 32-bit architectures. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/sb.c')
-rw-r--r--fs/ubifs/sb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c
index 8c25081a5109..fa0a982a6797 100644
--- a/fs/ubifs/sb.c
+++ b/fs/ubifs/sb.c
@@ -85,7 +85,7 @@ static int create_default_filesystem(struct ubifs_info *c)
long long tmp64, main_bytes;
__le64 tmp_le64;
__le32 tmp_le32;
- struct timespec ts;
+ struct timespec64 ts;
/* Some functions called from here depend on the @c->key_len filed */
c->key_len = UBIFS_SK_LEN;
@@ -301,8 +301,8 @@ static int create_default_filesystem(struct ubifs_info *c)
ino->creat_sqnum = cpu_to_le64(++c->max_sqnum);
ino->nlink = cpu_to_le32(2);
- ktime_get_real_ts(&ts);
- ts = timespec_trunc(ts, DEFAULT_TIME_GRAN);
+ ktime_get_real_ts64(&ts);
+ ts = timespec64_trunc(ts, DEFAULT_TIME_GRAN);
tmp_le64 = cpu_to_le64(ts.tv_sec);
ino->atime_sec = tmp_le64;
ino->ctime_sec = tmp_le64;