Patch "btrfs: Remove redundant extent_buffer_get in get_old_root" has been added to the 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    btrfs: Remove redundant extent_buffer_get in get_old_root

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     btrfs-remove-redundant-extent_buffer_get-in-get_old_.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit dd93fcfe869fa80e51739139620e79c18b57738d
Author: Nikolay Borisov <nborisov@xxxxxxxx>
Date:   Wed Aug 15 18:26:53 2018 +0300

    btrfs: Remove redundant extent_buffer_get in get_old_root
    
    [ Upstream commit 6c122e2a0c515cfb3f3a9cefb5dad4cb62109c78 ]
    
    get_old_root used used only by btrfs_search_old_slot to initialise the
    path structure. The old root is always a cloned buffer (either via alloc
    dummy or via btrfs_clone_extent_buffer) and its reference count is 2: 1
    from allocation, 1 from extent_buffer_get call in get_old_root.
    
    This latter explicit ref count acquire operation is in fact unnecessary
    since the semantic is such that the newly allocated buffer is handed
    over to the btrfs_path for lifetime management. Considering this just
    remove the extra extent_buffer_get in get_old_root.
    
    Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx>
    Reviewed-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 8eac5f75bca36..8765312743f16 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -1441,7 +1441,6 @@ get_old_root(struct btrfs_root *root, u64 time_seq)
 
 	if (!eb)
 		return NULL;
-	extent_buffer_get(eb);
 	btrfs_tree_read_lock(eb);
 	if (old_root) {
 		btrfs_set_header_bytenr(eb, eb->start);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux