]> www.infradead.org Git - users/dwmw2/linux.git/commit
btrfs: fix page leaks after failure to lock page for delalloc
authorRobbie Ko <robbieko@synology.com>
Mon, 20 Jul 2020 01:42:09 +0000 (09:42 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 21 Jul 2020 20:08:53 +0000 (22:08 +0200)
commit5909ca110b29aa16b23b52b8de8d3bb1035fd738
tree234936c92deb13a58c926fa4a0edcbad13e34099
parentfa91e4aa1716004ea8096d5185ec0451e206aea0
btrfs: fix page leaks after failure to lock page for delalloc

When locking pages for delalloc, we check if it's dirty and mapping still
matches. If it does not match, we need to return -EAGAIN and release all
pages. Only the current page was put though, iterate over all the
remaining pages too.

CC: stable@vger.kernel.org # 4.14+
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Robbie Ko <robbieko@synology.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c