summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2020-08-10 17:31:16 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-03 11:19:28 +0200
commit14edfd508f43723961ed70c07afb9f8ed5341f9d (patch)
tree45ba0d43680c5878b649eb8e492657bead5bcf85 /sound
parent973152b568cc28c15fb59ba446382486352bd099 (diff)
btrfs: check the right error variable in btrfs_del_dir_entries_in_log
[ Upstream commit fb2fecbad50964b9f27a3b182e74e437b40753ef ] With my new locking code dbench is so much faster that I tripped over a transaction abort from ENOSPC. This turned out to be because btrfs_del_dir_entries_in_log was checking for ret == -ENOSPC, but this function sets err on error, and returns err. So instead of properly marking the inode as needing a full commit, we were returning -ENOSPC and aborting in __btrfs_unlink_inode. Fix this by checking the proper variable so that we return the correct thing in the case of ENOSPC. The ENOENT needs to be checked, because btrfs_lookup_dir_item_index() can return -ENOENT if the dir item isn't in the tree log (which would happen if we hadn't fsync'ed this guy). We actually handle that case in __btrfs_unlink_inode, so it's an expected error to get back. Fixes: 4a500fd178c8 ("Btrfs: Metadata ENOSPC handling for tree log") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> [ add note and comment about ENOENT ] Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions