Re: [PATCH] btrfs: Remove unnecessary check from join_running_log_trans

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

 



On Thu, May 23, 2019 at 02:51:26PM +0300, Nikolay Borisov wrote:
> join_running_log_trans checks btrfs_root::log_root outside of
> btrfs_root::log_mutex to avoid contention on the mutex. Turns out this
> check is not necessary because the two callers of join_running_log_trans
> (both of which deal with removing entries from the tree-log during
> unlink) explicitly check whether the respective inode has been logged in
> the current transaction. If it hasn't then it won't have any items in
> the tree-log and call path will return before calling
> join_running_log_trans. If the check passes, however, then it's
> guaranteed that btrfs_root::log_root is set because the inode is logged.
> 
> Those guarantees allows us to remove the speculative as well as the
> implicity and tricky memory barrier. No functionl changes.
> 
> Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx>
> ---

Added to misc-next, thanks.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux