mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
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>
This commit is contained in:
parent
d85f1b5bad
commit
b3030e4f23
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user