]> git.baikalelectronics.ru Git - kernel.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)
committerDavid Sterba <dsterba@suse.com>
Wed, 25 Mar 2020 15:29:16 +0000 (16:29 +0100)
commitfa5fc463db54f86656fef2867a83013e0232f27b
tree90d285bcd137735cd26ca942412fdc47065df5b0
parent1004c62b2e28e47fcc3f7b238e27e580359629f6
btrfs: fix missing semaphore unlock in btrfs_sync_file

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: 0e9d2c534def8 ("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>
fs/btrfs/file.c