]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: clear EXTENT_DEFRAG bits in finish_ordered_io
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 26 May 2017 23:44:23 +0000 (17:44 -0600)
committerChris Mason <clm@fb.com>
Fri, 9 Jun 2017 19:48:29 +0000 (12:48 -0700)
commit6fa7061a223abe8187bc26d2b502576b8eea2964
tree74f25261a8064b9f36735dcdbb47cf1dbea1f8ac
parent8a03ae59517e66260501b8d97ea5b85e54c6fdb9
Btrfs: clear EXTENT_DEFRAG bits in finish_ordered_io

Before this, we use 'filled' mode here, ie. if all range has been
filled with EXTENT_DEFRAG bits, get to clear it, but if the defrag
range joins the adjacent delalloc range, then we'll have EXTENT_DEFRAG
bits in extent_state until releasing this inode's pages, and that
prevents extent_data from being freed.

This clears the bit if any was found within the ordered extent.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/inode.c