]> git.hungrycats.org Git - linux/commit
Btrfs: fix truncate_space_check
authorJosef Bacik <jbacik@fb.com>
Wed, 13 Jan 2016 16:45:56 +0000 (11:45 -0500)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Sat, 16 Jan 2016 02:44:33 +0000 (21:44 -0500)
commitcd23fed42909f9e375fe254560972e8c9b059c5c
treed1e844821d0f048bd989a341a880cbc24d446ab1
parent7540a6c8692696d1e9f7c6245a6914e0cc66cd18
Btrfs: fix truncate_space_check

truncate_space_check is using btrfs_csum_bytes_to_leaves() but forgetting to
multiply by nodesize so we get an actual byte count.  We need a tracepoint here
so that we have the matching reserve for the release that will come later.  Also
add a comment to make clear what the intent of truncate_space_check is.

Signed-off-by: Josef Bacik <jbacik@fb.com>
(cherry picked from commit f6af4b00d93ede652038357d95e2487bedcc492a)
fs/btrfs/inode.c