Skip to contentSkip to conversation

update tmpfs for new delete_inode behavior

PATCH In review Hugh Dickins 2 participants 2 messages Jul 12, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 update tmpfs for new delete_inode behavior

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.

mm/shmem.c +1 -0
@@ -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);
#1 lore raw
Quoted 4 lines · 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.

Erf, indeed I missed that one.

	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
[email protected]