]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: only dirty the inode in btrfs_update_time if something was changed
authorJeff Layton <jlayton@redhat.com>
Mon, 11 Dec 2017 11:35:24 +0000 (06:35 -0500)
committerJeff Layton <jlayton@redhat.com>
Mon, 29 Jan 2018 11:42:21 +0000 (06:42 -0500)
commit490c4e037e034c47c505e2143ce790085fbd5614
tree9fa581ae47fc8fe9c43667c039c8cc5e21ea7170
parentf4a28da6230aed47e7831f87edbb4b0631a4a58d
btrfs: only dirty the inode in btrfs_update_time if something was changed

At this point, we know that "now" and the file times may differ, and we
suspect that the i_version has been flagged to be bumped. Attempt to
bump the i_version, and only mark the inode dirty if that actually
occurred or if one of the times was updated.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: David Sterba <dsterba@suse.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
fs/btrfs/inode.c