summaryrefslogtreecommitdiffstats
path: root/fs/compat.c
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2008-08-20 04:16:59 +0200
committerTheodore Ts'o <tytso@mit.edu>2008-08-20 04:16:59 +0200
commitcd21322616c3af265d39bf15321d436e667a5dd1 (patch)
tree2e293b838191785a0ecf3b19f204731c73589139 /fs/compat.c
parentext4: Fix potential truncate BUG due to i_prealloc_list being non-empty (diff)
downloadlinux-cd21322616c3af265d39bf15321d436e667a5dd1.tar.xz
linux-cd21322616c3af265d39bf15321d436e667a5dd1.zip
ext4: Fix delalloc release block reservation for truncate
Ext4 will release the reserved blocks for delayed allocations when inode is truncated/unlinked. If there is no reserved block at all, we shouldn't need to do so. But current code still tries to release the reserved blocks regardless whether the counters's value is 0. Continue to do that causes the later calculation to go wrong and a kernel BUG_ON() caught that. This doesn't happen for extent-based files, as the calculation for 0 reserved blocks was right for extent based file. This patch fixed the kernel BUG() due to above reason. It adds checks for 0 to avoid unnecessary release and fix calculation for non-extent files. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/compat.c')
0 files changed, 0 insertions, 0 deletions