OSDN Git Service

btrfs: remove no longer needed full sync flag check at inode_logged()
authorFilipe Manana <fdmanana@suse.com>
Thu, 29 Jul 2021 14:29:01 +0000 (15:29 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:10 +0000 (13:19 +0200)
commitd135a5339611352047462ef5943aee3a1202aa37
treebba92d544ede69b7cfe0f9f94e2cd7d4687ce7ad
parent1c167b87f4f9c89e33dcffb92a45e30f937f04d6
btrfs: remove no longer needed full sync flag check at inode_logged()

Now that we are checking if the inode's logged_trans is 0 to detect the
possibility of the inode having been evicted and reloaded, the test for
the full sync flag (BTRFS_INODE_NEEDS_FULL_SYNC) is no longer needed at
tree-log.c:inode_logged(). Its purpose was to detect the possibility
of a previous eviction as well, since when an inode is loaded the full
sync flag is always set on it (and only cleared after the inode is
logged).

So just remove the check and update the comment. The check for the inode's
logged_trans being 0 was added recently by the patch with the subject
"btrfs: eliminate some false positives when checking if inode was logged".

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-log.c