Btrfs: fix leak of subvolume writers counter
authorRobbie Ko <robbieko@synology.com>
Fri, 7 Oct 2016 02:01:29 +0000 (10:01 +0800)
committerFilipe Manana <fdmanana@suse.com>
Fri, 24 Feb 2017 00:38:01 +0000 (00:38 +0000)
commit91e1f56a8b3c94cb5ac9ce12b806134dc33c1eeb
treecf195dc2a83a87b24a495a8cb7357f17f690f117
parent6f546216e9f9e95d6783547ce6113eb13e2daa54
Btrfs: fix leak of subvolume writers counter

When falling back from a nocow write to a regular cow write, we were
leaking the subvolume writers counter in 2 situations, preventing
snapshot creation from ever completing in the future, as it waits
for that counter to go down to zero before the snapshot creation
starts.

Signed-off-by: Robbie Ko <robbieko@synology.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
[Improved changelog and subject]
Signed-off-by: Filipe Manana <fdmanana@suse.com>
fs/btrfs/inode.c