]> git.itanic.dy.fi Git - linux-stable/commit
Btrfs: bail out on error during replay_dir_deletes
authorLiu Bo <bo.liu@linux.alibaba.com>
Mon, 2 Apr 2018 17:59:48 +0000 (01:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:47:39 +0000 (07:47 +0200)
commitb56cd693a93802c3ffbe3007a29f14a306c3f575
treed2aee5a1ce5f740dc20ed60dcc64bdc8c4fa25ff
parent1d79b1d257adbf9b2fc01fc4fa843dda8d2b1bb6
Btrfs: bail out on error during replay_dir_deletes

[ Upstream commit b98def7ca6e152ee55e36863dddf6f41f12d1dc6 ]

If errors were returned by btrfs_next_leaf(), replay_dir_deletes needs
to bail out, otherwise @ret would be forced to be 0 after 'break;' and
the caller won't be aware of it.

Fixes: e02119d5a7b4 ("Btrfs: Add a write ahead tree log to optimize synchronous operations")
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/tree-log.c