From: Hugh Dickins 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 Signed-off-by: Andrew Morton --- mm/shmem.c | 1 + 1 files changed, 1 insertion(+) diff -puN mm/shmem.c~update-filesystems-for-new-delete_inode-behavior-fix mm/shmem.c --- devel/mm/shmem.c~update-filesystems-for-new-delete_inode-behavior-fix 2005-07-12 15:16:05.000000000 -0700 +++ devel-akpm/mm/shmem.c 2005-07-12 15:16:05.000000000 -0700 @@ -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); _