Patch "btrfs: Remove extraneous extent_buffer_get from tree_mod_log_rewind" 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 extraneous extent_buffer_get from tree_mod_log_rewind

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-extraneous-extent_buffer_get-from-tree_.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 86b7e44255789feb39838585708acb19c3be673f
Author: Nikolay Borisov <nborisov@xxxxxxxx>
Date:   Wed Aug 15 18:26:54 2018 +0300

    btrfs: Remove extraneous extent_buffer_get from tree_mod_log_rewind
    
    [ Upstream commit 24cee18a1c1d7c731ea5987e0c99daea22ae7f4a ]
    
    When a rewound buffer is created it already has a ref count of 1 and the
    dummy flag set. Then another ref is taken bumping the count to 2.
    Finally when this buffer is released from btrfs_release_path the extra
    reference is decremented by the special handling code in
    free_extent_buffer.
    
    However, this special code is in fact redundant sinca ref count of 1 is
    still correct since the buffer is only accessed via btrfs_path struct.
    This paves the way forward of removing the special handling in
    free_extent_buffer.
    
    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 8765312743f16..a8660b503bf36 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -1372,7 +1372,6 @@ tree_mod_log_rewind(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
 	btrfs_tree_read_unlock_blocking(eb);
 	free_extent_buffer(eb);
 
-	extent_buffer_get(eb_rewin);
 	btrfs_tree_read_lock(eb_rewin);
 	__tree_mod_log_rewind(fs_info, eb_rewin, time_seq, tm);
 	WARN_ON(btrfs_header_nritems(eb_rewin) >



[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