Btrfs: protect the pending_snapshots list with trans_lock
authorJosef Bacik <josef@redhat.com>
Tue, 14 Jun 2011 19:16:14 +0000 (15:16 -0400)
committerJosef Bacik <josef@redhat.com>
Wed, 15 Jun 2011 17:24:46 +0000 (13:24 -0400)
Currently there is nothing protecting the pending_snapshots list on the
transaction.  We only hold the directory mutex that we are snapshotting and a
read lock on the subvol_sem, so we could race with somebody else creating a
snapshot in a different directory and end up with list corruption.  So protect
this list with the trans_lock.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>

No differences found