Re: [PATCH 02/21] fs: ext4: Use current_fs_time() for inode timestamps

From: Linus Torvalds
Date: Thu Jun 09 2016 - 14:55:31 EST


On Thu, Jun 9, 2016 at 11:45 AM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> All existing users and all the ones in this patch (and the others too,
> although I didn't go through them very carefully) really would prefer
> just passing in the inode directly, rather than the superblock.

Actually, there seems to be one exception to that "all existing
users", and that one exception (btrfs transacation time) really seems
to be broken. Exactly because it's *not* setting an inode time, it
shouldn't have used current_fs_time() to begin with, because it is
just setting an internal filesystem timestamp.

So not making the argument inode-related seems to actually encourage
people to misuse this function.

Linus