]> asedeno.scripts.mit.edu Git - linux.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)
commit3a8c7231d53641a21d794c7406044e19ad299a00
tree9fa581ae47fc8fe9c43667c039c8cc5e21ea7170
parentd17260fd5f9cd5c112cbcbbfd3024186d34c02d7
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