summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2023-08-07 22:38:32 +0300
committerChristian Brauner <brauner@kernel.org>2023-08-09 09:56:36 +0300
commitb3030e4f23441347cd5d18b2610fb299ed98d739 (patch)
tree5976c59b61a60248823a71506dd4d8181d692a1f
parentd85f1b5bad5752831b11bdeb5a1c403075673c0d (diff)
downloadlinux-b3030e4f23441347cd5d18b2610fb299ed98d739.tar.xz
fs: remove silly warning from current_time
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>
-rw-r--r--fs/inode.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/inode.c b/fs/inode.c
index d4ab92233062..3fc251bfaf73 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);