diff options
author | Naohiro Aota <naohiro.aota@wdc.com> | 2017-09-01 17:58:47 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-09-26 14:49:00 +0200 |
commit | 63d71450c8d817649a79e37d685523f988b9cc98 (patch) | |
tree | 73f0f38a93450f66eb2d209f095715bbf9297ee6 /fs/read_write.c | |
parent | bea7eafdbda3ba1d4b2ccb9cca829eefb7989bb9 (diff) |
btrfs: clear ordered flag on cleaning up ordered extents
Commit 524272607e88 ("btrfs: Handle delalloc error correctly to avoid
ordered extent hang") introduced btrfs_cleanup_ordered_extents() to cleanup
submitted ordered extents. However, it does not clear the ordered bit
(Private2) of corresponding pages. Thus, the following BUG occurs from
free_pages_check_bad() (on btrfs/125 with nospace_cache).
BUG: Bad page state in process btrfs pfn:3fa787
page:ffffdf2acfe9e1c0 count:0 mapcount:0 mapping: (null) index:0xd
flags: 0x8000000000002008(uptodate|private_2)
raw: 8000000000002008 0000000000000000 000000000000000d 00000000ffffffff
raw: ffffdf2acf5c1b20 ffffb443802238b0 0000000000000000 0000000000000000
page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
bad because of flags: 0x2000(private_2)
This patch clears the flag same as other places calling
btrfs_dec_test_ordered_pending() for every page in the specified range.
Fixes: 524272607e88 ("btrfs: Handle delalloc error correctly to avoid ordered extent hang")
Cc: <stable@vger.kernel.org> # 4.12
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: Qu Wenruo <quwenruo.btrfs@gmx.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/read_write.c')
0 files changed, 0 insertions, 0 deletions