android_kernel_xiaomi_sm8350/fs
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
..
9p [PATCH] v9fs: remove additional buffer allocation from v9fs_file_read and v9fs_file_write 2005-10-11 09:46:54 -07:00
adfs
affs [PATCH] update filesystems for new delete_inode behavior 2005-09-09 13:57:27 -07:00
afs [PATCH] mm: split page table lock 2005-10-29 21:40:42 -07:00
autofs [PATCH] autofs: fix "busy inodes after umount..." 2005-09-09 13:57:31 -07:00
autofs4
befs
bfs [PATCH] bfs iget() abuses 2005-10-04 13:22:01 -07:00
cifs [PATCH] cifs: Add support for suspend 2005-09-23 11:37:53 -07:00
coda [PATCH] Driver Core: fix up all callers of class_device_create() 2005-10-28 09:52:52 -07:00
cramfs [PATCH] fs/cramfs/uncompress.c should #include <linux/cramfs_fs.h> 2005-09-10 10:06:35 -07:00
debugfs
devfs
devpts
efs
exportfs
ext2 [PATCH] Test for sb_getblk return value 2005-10-30 17:37:26 -08:00
ext3 [PATCH] Test for sb_getblk return value 2005-10-30 17:37:26 -08:00
fat [PATCH] fat: Remove duplicate directory scanning code 2005-10-30 17:37:32 -08:00
freevxfs
fuse [PATCH] fuse: spelling fixes 2005-10-30 17:37:24 -08:00
hfs [PATCH] gfp_t: fs/* 2005-10-28 08:16:47 -07:00
hfsplus [PATCH] gfp_t: fs/* 2005-10-28 08:16:47 -07:00
hostfs [PATCH] uml: remove empty hostfs_truncate method 2005-09-30 12:41:18 -07:00
hpfs [PATCH] update filesystems for new delete_inode behavior 2005-09-09 13:57:27 -07:00
hppfs
hugetlbfs [PATCH] hugetlb: overcommit accounting check 2005-10-29 21:40:43 -07:00
isofs
jbd [PATCH] gfp_t: fs/* 2005-10-28 08:16:47 -07:00
jffs [PATCH] janitor: jffs/intrep: list_for_each_entry 2005-09-10 10:06:32 -07:00
jffs2 [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
jfs [PATCH] mm: split page table lock 2005-10-29 21:40:42 -07:00
lockd [PATCH] RPC: remove xprt->nocong 2005-09-23 12:38:47 -04:00
minix [PATCH] update filesystems for new delete_inode behavior 2005-09-09 13:57:27 -07:00
msdos [PATCH] fat: remove the unneeded vfat_find() in vfat_rename() 2005-10-30 17:37:32 -08:00
ncpfs [PATCH] update filesystems for new delete_inode behavior 2005-09-09 13:57:27 -07:00
nfs [PATCH] NFS: Remove unbalanced spin_unlock() calls from nfs_refresh_inode() 2005-10-30 14:46:47 -08:00
nfs_common [PATCH] nfsacl: Solaris VxFS compatibility fix 2005-10-11 09:46:54 -07:00
nfsd [PATCH] nfsd4: fix setclientid unlock of unlocked state lock 2005-09-13 08:22:32 -07:00
nls
ntfs NTFS: Document extended attribute ($EA) NEED_EA flag. (Based on libntfs 2005-10-24 09:00:51 +01:00
openpromfs
partitions Merge ../bleed-2.6 2005-10-28 10:13:16 -07:00
proc Merge ../linux-2.6 by hand 2005-10-31 13:37:12 +11:00
qnx4 [PATCH] update filesystems for new delete_inode behavior 2005-09-09 13:57:27 -07:00
ramfs
reiserfs [PATCH] reiserfs: [kv]free() checking cleanup 2005-10-30 17:37:17 -08:00
relayfs [PATCH] relayfs: fix bogus param value in call to vmap 2005-10-10 08:39:50 -07:00
romfs
smbfs [PATCH] fs: fix-up schedule_timeout() usage 2005-09-10 10:06:36 -07:00
sysfs
sysv [PATCH] update filesystems for new delete_inode behavior 2005-09-09 13:57:27 -07:00
udf [PATCH] update filesystems for new delete_inode behavior 2005-09-09 13:57:27 -07:00
ufs [PATCH] update filesystems for new delete_inode behavior 2005-09-09 13:57:27 -07:00
vfat [PATCH] fat: remove the unneeded vfat_find() in vfat_rename() 2005-10-30 17:37:32 -08:00
xfs [PATCH] mm: split page table lock 2005-10-29 21:40:42 -07:00
aio.c [PATCH] aio syscalls are not checked by lsm 2005-10-23 16:38:38 -07:00
attr.c [PATCH] fs/attr.c: remove BUG() 2005-10-30 17:37:27 -08:00
bad_inode.c
binfmt_aout.c [PATCH] mm: mm_init set_mm_counters 2005-10-29 21:40:38 -07:00
binfmt_elf_fdpic.c [PATCH] mm: mm_init set_mm_counters 2005-10-29 21:40:38 -07:00
binfmt_elf.c [PATCH] Don't uselessly export task_struct to userspace in core dumps 2005-10-30 17:37:18 -08:00
binfmt_em86.c
binfmt_flat.c [PATCH] mm: mm_init set_mm_counters 2005-10-29 21:40:38 -07:00
binfmt_misc.c
binfmt_script.c
binfmt_som.c [PATCH] mm: mm_init set_mm_counters 2005-10-29 21:40:38 -07:00
bio.c [PATCH] gfp_t: fs/* 2005-10-28 08:16:47 -07:00
block_dev.c
buffer.c [PATCH] __bread oops fix 2005-10-30 17:37:27 -08:00
char_dev.c
compat_ioctl.c [PATCH] TIOC* compat ioctl handling 2005-10-30 17:37:17 -08:00
compat.c [PATCH] mm: update_hiwaters just in time 2005-10-29 21:40:39 -07:00
dcache.c [PATCH] gfp_t: fs/* 2005-10-28 08:16:47 -07:00
dcookies.c
direct-io.c [PATCH] core remove PageReserved 2005-10-29 21:40:39 -07:00
dnotify.c
dquot.c [PATCH] reduce sizeof(struct file) 2005-10-30 17:37:19 -08:00
eventpoll.c [PATCH] epoll: handle timeout overflow 2005-09-28 07:46:41 -07:00
exec.c [PATCH] fix de_thread() vs do_coredump() deadlock 2005-10-30 17:37:25 -08:00
fcntl.c [PATCH] files: lock-free fd look-up 2005-09-09 13:57:55 -07:00
fifo.c
file_table.c [PATCH] reduce sizeof(struct file) 2005-10-30 17:37:19 -08:00
file.c [PATCH] Fix the fdtable freeing in the case of vmalloced fdset/arrays 2005-09-14 12:38:26 -07:00
filesystems.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
fs-writeback.c [PATCH] fix __writeback_single_inode WARN_ON 2005-10-31 14:22:04 -08:00
inode.c [PATCH] fix nr_unused accounting, and avoid recursing in iput with I_WILL_FREE set 2005-10-30 17:37:26 -08:00
inotify.c [PATCH] inotify/idr leak fix 2005-10-23 16:38:39 -07:00
ioctl.c
ioprio.c
Kconfig [PATCH] CONFIG_IA32 2005-10-30 17:37:10 -08:00
Kconfig.binfmt [PATCH] CONFIG_IA32 2005-10-30 17:37:10 -08:00
libfs.c
locks.c Fix Connectathon locking test failure 2005-10-18 14:20:21 -07:00
Makefile [PATCH] FUSE - MAINTAINERS, Kconfig and Makefile changes 2005-09-09 14:03:44 -07:00
mbcache.c [PATCH] gfp_t: fs/* 2005-10-28 08:16:47 -07:00
mpage.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
namei.c [PATCH] open: cleanup in lookup_flags() 2005-10-30 17:37:18 -08:00
namespace.c [PATCH] janitor: fs/namespace.c: list_for_each_entry 2005-09-10 10:06:32 -07:00
nfsctl.c
open.c VFS: Allow the filesystem to return a full file pointer on open intent 2005-10-18 14:20:16 -07:00
pipe.c [PATCH] sched: TASK_NONINTERACTIVE 2005-09-10 10:06:22 -07:00
posix_acl.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
quota_v1.c
quota_v2.c
quota.c
read_write.c [PATCH] readv/writev syscalls are not checked by lsm 2005-09-29 15:42:08 -07:00
readdir.c
select.c [PATCH] files: lock-free fd look-up 2005-09-09 13:57:55 -07:00
seq_file.c
stat.c
super.c [PATCH] reduce sizeof(struct file) 2005-10-30 17:37:19 -08:00
xattr_acl.c
xattr.c [PATCH] SELinux: canonicalize getxattr() 2005-10-30 17:37:11 -08:00