fs: remove silly warning from current_time
authorJeff Layton <jlayton@kernel.org>
Mon, 7 Aug 2023 19:38:32 +0000 (15:38 -0400)
committerChristian Brauner <brauner@kernel.org>
Wed, 9 Aug 2023 06:56:36 +0000 (08:56 +0200)
An inode with no superblock? Unpossible!

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Message-Id: <20230807-mgctime-v7-1-d1dec143a704@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/inode.c

index d4ab922..3fc251b 100644 (file)
@@ -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);