Btrfs: unpin log if rename operation fails
authorFilipe Manana <fdmanana@suse.com>
Fri, 29 Apr 2016 10:34:22 +0000 (11:34 +0100)
committerFilipe Manana <fdmanana@suse.com>
Fri, 13 May 2016 00:59:18 +0000 (01:59 +0100)
commit3dc9e8f76720fbbd9c56a11775932733fe13d214
treeda778eb649c5ba5fada99372055777fd62ae09f7
parent9cfa3e34e20e6798a671236000d9e97c8aa5d318
Btrfs: unpin log if rename operation fails

If rename operations fail at some point after we pinned the log, we end
up aborting the current transaction but never unpin the log, which leaves
concurrent tasks that are trying to sync the log (as part of an fsync
request from user space) blocked forever and preventing the filesystem
from being unmountable.

Fix this by safely unpinning the log.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
fs/btrfs/inode.c