]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: fix missing semaphore unlock in btrfs_sync_file
authorRobbie Ko <robbieko@synology.com>
Tue, 17 Mar 2020 06:31:02 +0000 (14:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 14:12:08 +0000 (16:12 +0200)
commitbb9c00cfe5620ad3d427f8a335fde257aa7ace9f
tree6c67a4a5676ba7cc3453bc7cf2b09d13c4cab431
parent4305d042ef595a4c72a5aff2a1de0e3925477d4d
btrfs: fix missing semaphore unlock in btrfs_sync_file

commit 6ff06729c22ec0b7498d900d79cc88cfb8aceaeb upstream.

Ordered ops are started twice in sync file, once outside of inode mutex
and once inside, taking the dio semaphore. There was one error path
missing the semaphore unlock.

Fixes: aab15e8ec2576 ("Btrfs: fix rare chances for data loss when doing a fast fsync")
CC: stable@vger.kernel.org # 4.19+
Signed-off-by: Robbie Ko <robbieko@synology.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
[ add changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/file.c