Andrea Arcangeli 659603ef69 [PATCH] fix __writeback_single_inode WARN_ON
When the inode count is zero in inode writeback, the

	WARN_ON(!(inode->i_state & I_WILL_FREE));

is broken, and needs to test for either I_WILL_FREE|I_FREEING.

When the inode is in I_FREEING state, it's already out of the visibility
of the vm so it can't be freed so it doesn't require the __iget and the
generic_delete_inode path can call the sync internally to the lowlevel
fs callback during the last iput. So the inode being in I_FREEING is
also a valid condition for calling the sync with i_count == 0.

The specific stack trace is this:

  0xc00000007b8fb6e0  0xc00000000010118c  .__writeback_single_inode +0x5c
  0xc00000007b8fb6e0  0xc0000000001014dc (lr) .sync_inode +0x3c
  0xc00000007b8fb790  0xc0000000001014dc  .sync_inode +0x3c
  0xc00000007b8fb820  0xc0000000001a5020  .ext2_sync_inode +0x64
  0xc00000007b8fb8f0  0xc0000000001a65b4  .ext2_truncate +0x3f8
  0xc00000007b8fba40  0xc0000000001a6940  .ext2_delete_inode +0xdc
  0xc00000007b8fbac0  0xc0000000000f7a5c  .generic_delete_inode +0x124
  0xc00000007b8fbb50  0xc0000000000f5fe0  .iput +0xb8
  0xc00000007b8fbbe0  0xc0000000000e9fd4  .sys_unlink +0x2a8
  0xc00000007b8fbd10  0xc00000000001048c  .ret_from_syscall_1 +0x0

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-31 14:22:04 -08:00
..
2005-10-29 21:40:42 -07:00
2005-10-04 13:22:01 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-10-30 17:37:24 -08:00
2005-10-28 08:16:47 -07:00
2005-10-28 08:16:47 -07:00
2005-08-06 09:42:06 -07:00
2005-10-28 08:16:47 -07:00
2005-10-30 17:37:32 -08:00
2005-10-29 21:40:42 -07:00
2005-09-23 12:38:47 -04:00
2005-05-05 16:36:47 -07:00
2005-04-16 15:20:36 -07:00
2005-10-28 10:13:16 -07:00
2005-10-31 13:37:12 +11:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-10-29 21:40:42 -07:00
2005-10-30 17:37:27 -08:00
2005-05-05 16:36:47 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-10-28 08:16:47 -07:00
2005-10-30 17:37:27 -08:00
2005-07-12 16:01:02 -07:00
2005-10-28 08:16:47 -07:00
2005-10-29 21:40:39 -07:00
2005-04-16 15:20:36 -07:00
2005-10-30 17:37:19 -08:00
2005-09-09 13:57:55 -07:00
2005-04-16 15:20:36 -07:00
2005-10-30 17:37:32 -08:00
2005-10-23 16:38:39 -07:00
2005-04-16 15:20:36 -07:00
2005-10-30 17:37:10 -08:00
2005-10-30 17:37:10 -08:00
2005-10-18 14:20:21 -07:00
2005-10-28 08:16:47 -07:00
2005-10-08 15:00:57 -07:00
2005-04-16 15:20:36 -07:00
2005-09-10 10:06:22 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-09-09 13:57:55 -07:00
2005-04-16 15:20:36 -07:00
2005-10-30 17:37:19 -08:00
2005-04-16 15:20:36 -07:00