]> git.hungrycats.org Git - linux/commit
Btrfs: fix hang when failing to submit bio of directIO
authorLiu Bo <bo.li.liu@oracle.com>
Wed, 17 Jun 2015 08:59:57 +0000 (16:59 +0800)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Sat, 4 Jul 2015 02:00:19 +0000 (22:00 -0400)
commit2bad5d98a86891f3fb65ca98c0dcc0365b99fd0c
tree56fee3671cae052abc0197a22e0e20071bce9575
parent376c74b16f3b4ea41523f2c6868426d3c3d151ad
Btrfs: fix hang when failing to submit bio of directIO

The hang is uncoverd by generic/019.

btrfs_endio_direct_write() skips the "finish_ordered_fn" part when it hits
an error, thus those added ordered extents will never get processed, which
block processes that waiting for them via btrfs_start_ordered_extent().

This fixes the above, and meanwhile finish_ordered_fn will do the space
accounting work.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Tested-by: Filipe Manana <fdmanana@suse.com>
(cherry picked from commit 70466207b172c10c72f22bf9e233b898611f497c)
fs/btrfs/inode.c