aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-04-13 03:37:36 -0400
committerDavid Howells <dhowells@redhat.com>2019-04-13 03:37:36 -0400
commitba25b81e3a420f8345585029d49ee32e73de9d5f (patch)
treec2d8878bb368cc92a67857ba2ab14a11429a21de
parented0de45a1008991fdaa27a0152befcb74d126a8b (diff)
afs: avoid deprecated get_seconds()
get_seconds() has a limited range on 32-bit architectures and is deprecated because of that. While AFS uses the same limits for its inode timestamps on the wire protocol, let's just use the simpler current_time() as we do for other file systems. This will still zero out the 'tv_nsec' field of the timestamps internally. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--fs/afs/inode.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/afs/inode.c b/fs/afs/inode.c
index 1a4ce07fb406..9cedc3fc1b77 100644
--- a/fs/afs/inode.c
+++ b/fs/afs/inode.c
@@ -216,9 +216,7 @@ struct inode *afs_iget_pseudo_dir(struct super_block *sb, bool root)
216 set_nlink(inode, 2); 216 set_nlink(inode, 2);
217 inode->i_uid = GLOBAL_ROOT_UID; 217 inode->i_uid = GLOBAL_ROOT_UID;
218 inode->i_gid = GLOBAL_ROOT_GID; 218 inode->i_gid = GLOBAL_ROOT_GID;
219 inode->i_ctime.tv_sec = get_seconds(); 219 inode->i_ctime = inode->i_atime = inode->i_mtime = current_time(inode);
220 inode->i_ctime.tv_nsec = 0;
221 inode->i_atime = inode->i_mtime = inode->i_ctime;
222 inode->i_blocks = 0; 220 inode->i_blocks = 0;
223 inode_set_iversion_raw(inode, 0); 221 inode_set_iversion_raw(inode, 0);
224 inode->i_generation = 0; 222 inode->i_generation = 0;