]> rtime.felk.cvut.cz Git - linux-imx.git/commit
Btrfs: fix race in sync and freeze again
authorJosef Bacik <jbacik@fusionio.com>
Fri, 14 Sep 2012 14:34:40 +0000 (10:34 -0400)
committerChris Mason <chris.mason@fusionio.com>
Thu, 4 Oct 2012 13:39:56 +0000 (09:39 -0400)
commit60376ce4a8396bc5cd777be05b6a9bf044520f42
tree9648ab1c651557c640b8cdd24ce18d75b434c510
parentb3ae244e7174d981c09ad7a6a68e7909d600aaca
Btrfs: fix race in sync and freeze again

I screwed this up, there is a race between checking if there is a running
transaction and actually starting a transaction in sync where we could race
with a freezer and get ourselves into trouble.  To fix this we need to make
a new join type to only do the try lock on the freeze stuff.  If it fails
we'll return EPERM and just return from sync.  This fixes a hang Liu Bo
reported when running xfstest 68 in a loop.  Thanks,

Reported-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/super.c
fs/btrfs/transaction.c
fs/btrfs/transaction.h