[PATCH -rc2-mm2] update tmpfs for new delete_inode behavior

From: Hugh Dickins
Date: Tue Jul 12 2005 - 09:22:04 EST


LTP on tmpfs hits kernel BUG at mm/shmem.c:680! shmem_delete_inode needs
to truncate_inode_pages for itself now. It's not immediately obvious since
many cases get covered by shmem_truncate's followup truncate_inode_pages:
maybe with thought we can just call it once, but right now fix the BUG.

Signed-off-by: Hugh Dickins <hugh@xxxxxxxxxxx>

--- 2.6.13-rc2-mm2/mm/shmem.c 2005-07-06 11:23:52.000000000 +0100
+++ linux/mm/shmem.c 2005-07-12 13:58:26.000000000 +0100
@@ -668,6 +668,7 @@ static void shmem_delete_inode(struct in
struct shmem_inode_info *info = SHMEM_I(inode);

if (inode->i_op->truncate == shmem_truncate) {
+ truncate_inode_pages(inode->i_mapping, 0);
shmem_unacct_size(info->flags, inode->i_size);
inode->i_size = 0;
shmem_truncate(inode);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/