Btrfs: fix possible ENOSPC problems with truncate
authorJosef Bacik <josef@redhat.com>
Tue, 13 Oct 2009 20:46:49 +0000 (16:46 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 14 Oct 2009 14:32:47 +0000 (10:32 -0400)
commit5d5e103a70f74ae98e3965a4add1ab951d0651d1
tree83b1cc73830f72f592aa804207a679912beef101
parent0eda294dfc980c1cbe4f8a0564bf543f86a01ddb
Btrfs: fix possible ENOSPC problems with truncate

There's a problem where we don't do any space reservation for truncates, which
can cause you to OOPs because you will be allowed to go off in the weeds a bit
since we don't account for the delalloc bytes that are created as a result of
the truncate.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c