summaryrefslogtreecommitdiff
path: root/fs/ufs/ialloc.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-08-17 15:43:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-17 16:20:27 -0700
commita3fda0ffeaf0114328024aee4a9ec3b08af4b077 (patch)
tree4a8bb141028225eebeeedd329c4c1b01f6e0edc5 /fs/ufs/ialloc.c
parent2c1bb29aa6e7b0e52d84bd06bc199b0a5076a781 (diff)
fs/ufs: use ktime_get_real_seconds for sb and cg timestamps
get_seconds() is deprecated because of the 32-bit overflow and will be removed. All callers in ufs also truncate to a 32-bit number, so nothing changes during the conversion, but this should be harmless as the superblock and cylinder group timestamps are not visible to user space, except for checking the fs-dirty state, wich works fine across the overflow. This moves the call to get_seconds() into a new inline function, with a comment explaining the constraints, while converting it to ktime_get_real_seconds(). Link: http://lkml.kernel.org/r/20180718115017.742609-1-arnd@arndb.de Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ufs/ialloc.c')
-rw-r--r--fs/ufs/ialloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c
index 02c0a4be4212..969fd60436d3 100644
--- a/fs/ufs/ialloc.c
+++ b/fs/ufs/ialloc.c
@@ -89,7 +89,7 @@ void ufs_free_inode (struct inode * inode)
if (!ufs_cg_chkmagic(sb, ucg))
ufs_panic (sb, "ufs_free_fragments", "internal error, bad cg magic number");
- ucg->cg_time = cpu_to_fs32(sb, get_seconds());
+ ucg->cg_time = ufs_get_seconds(sb);
is_directory = S_ISDIR(inode->i_mode);