Commit b3030e4f authored by Jeff Layton's avatar Jeff Layton Committed by Christian Brauner

fs: remove silly warning from current_time

An inode with no superblock? Unpossible!
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Message-Id: <20230807-mgctime-v7-1-d1dec143a704@kernel.org>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent d85f1b5b
...@@ -2495,12 +2495,6 @@ struct timespec64 current_time(struct inode *inode) ...@@ -2495,12 +2495,6 @@ struct timespec64 current_time(struct inode *inode)
struct timespec64 now; struct timespec64 now;
ktime_get_coarse_real_ts64(&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); return timestamp_truncate(now, inode);
} }
EXPORT_SYMBOL(current_time); EXPORT_SYMBOL(current_time);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment