]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: delayed-inode: remove unnecessary call to btrfs_mark_buffer_dirty()
authorFilipe Manana <fdmanana@suse.com>
Wed, 18 Dec 2024 12:26:42 +0000 (12:26 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:19 +0000 (14:53 +0100)
The call to btrfs_mark_buffer_dirty() at __btrfs_update_delayed_inode() is
not necessary as we have a path setup for writing with btrfs_search_slot()
having a 'cow' argument set to 1.

This just makes the code more verbose, confusing and add a little extra
overhead and well as increase the module's text size, so remove it.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-inode.c

index 60a6866a6cd921e4ed5df75f6a7b8dcbed74e180..f9f1a972a6f77fb87c944dac93f1b064e4e71351 100644 (file)
@@ -1033,7 +1033,6 @@ static int __btrfs_update_delayed_inode(struct btrfs_trans_handle *trans,
                                    struct btrfs_inode_item);
        write_extent_buffer(leaf, &node->inode_item, (unsigned long)inode_item,
                            sizeof(struct btrfs_inode_item));
-       btrfs_mark_buffer_dirty(trans, leaf);
 
        if (!test_bit(BTRFS_DELAYED_NODE_DEL_IREF, &node->flags))
                goto out;