]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: only unlock and relock if we have to
authorJosef Bacik <jbacik@fusionio.com>
Wed, 7 Nov 2012 18:44:13 +0000 (13:44 -0500)
committerChris Mason <chris.mason@fusionio.com>
Mon, 17 Dec 2012 01:46:27 +0000 (20:46 -0500)
commiteb031e0a9282ffda97b632a44e7eb45b74a04c72
treeedf9d51c481b4b7cf62a47986d13227ec36c541e
parentf2b50474245f554208e61999580538f59e343473
Btrfs: only unlock and relock if we have to

I noticed while doing fsync tests that we were always dropping the path and
re-searching when we first cow the log root even though we've already gotten
the write lock on the root.  That's because we don't take into account that
there might not be a parent node, so fix the check to make sure there is
actually a parent node before we undo all of this work for nothing.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/ctree.c