From: Jeff Layton Date: Mon, 7 Aug 2023 19:38:32 +0000 (-0400) Subject: fs: remove silly warning from current_time X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b3030e4f23441347cd5d18b2610fb299ed98d739;p=linux.git fs: remove silly warning from current_time An inode with no superblock? Unpossible! Signed-off-by: Jeff Layton Reviewed-by: Jan Kara Message-Id: <20230807-mgctime-v7-1-d1dec143a704@kernel.org> Signed-off-by: Christian Brauner --- diff --git a/fs/inode.c b/fs/inode.c index d4ab92233062e..3fc251bfaf73f 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -2495,12 +2495,6 @@ struct timespec64 current_time(struct inode *inode) struct timespec64 now; ktime_get_coarse_real_ts64(&now); - - if (unlikely(!inode->i_sb)) { - WARN(1, "current_time() called with uninitialized super_block in the inode"); - return now; - } - return timestamp_truncate(now, inode); } EXPORT_SYMBOL(current_time);