Skip to content
Commit f03d9301 authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: Don't try to compress pages past i_size



The compression code had some checks to make sure we were only
compressing bytes inside of i_size, but it wasn't catching every
case.  To make things worse, some incorrect math about the number
of bytes remaining would make it try to compress more pages than the
file really had.

The fix used here is to fall back to the non-compression code in this
case, which does all the proper cleanup of delalloc and other accounting.

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 81144949
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment