]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix error path in create_pending_snapshot()
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 6 Sep 2012 10:00:32 +0000 (04:00 -0600)
committerChris Mason <chris.mason@fusionio.com>
Mon, 1 Oct 2012 19:19:09 +0000 (15:19 -0400)
commit364e4f5b7092ab6d67947bc5486625cbed2b8960
tree97c65df04e339c42b0255d1058f9ef2c73ec857a
parented0c5445c083833e79ca01a2bc6034f6f713f5d1
Btrfs: fix error path in create_pending_snapshot()

This patch fixes the following problem:
- If we failed to deal with the delayed dir items, we should abort transaction,
  just as its comment said. Fix it.
- If root reference or root back reference insertion failed, we should
  abort transaction. Fix it.
- Fix the double free problem of pending->inherit.
- Do not restore the trans->rsv if we doesn't change it.
- make the error path more clearly.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
fs/btrfs/transaction.c