From: Tristan Ye Date: Thu, 12 May 2011 12:47:07 +0000 (+0800) Subject: ocfs2: skip existing hole when removing the last extent_rec in punching-hole codes. X-Git-Tag: v2.6.39~1^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a790ba1ec02bbae0933e7ebd576c0bc329e9796;p=pandora-kernel.git ocfs2: skip existing hole when removing the last extent_rec in punching-hole codes. In the case of removing a partial extent record which covers a hole, current punching-hole logic will try to remove more than the length of whole extent record, which leads to the failure of following assert(fs/ocfs2/alloc.c): 5507 BUG_ON(cpos < le32_to_cpu(rec->e_cpos) || trunc_range > rec_range); This patch tries to skip existing hole at the last attempt of removing a partial extent record, what's more, it also adds some necessary comments for better understanding of punching-hole codes. Signed-off-by: Tristan Ye Signed-off-by: Joel Becker --- Reading git-diff-tree failed