linux/fs/ext2
Jan Kara c288d29696 ext2: Fix BUG_ON in evict() on inode deletion
Commit 8e3dffc6 introduced a regression where deleting inode with
large extended attributes leads to triggering
  BUG_ON(inode->i_state != (I_FREEING | I_CLEAR))
in fs/inode.c:evict(). That happens because freeing of xattr block
dirtied the inode and it happened after clear_inode() has been called.

Fix the issue by moving removal of xattr block into ext2_evict_inode()
before clear_inode() call close to a place where data blocks are
truncated. That is also more logical place and removes surprising
requirement that ext2_free_blocks() mustn't dirty the inode.

Reported-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2013-03-13 15:23:44 +01:00
..
acl.c userns: Convert extN to support kuids and kgids in posix acls 2012-09-18 01:01:36 -07:00
acl.h ext2: remove duplicate 'ext2_get_acl()' define 2011-07-29 23:21:50 -07:00
balloc.c Ext2: remove the static function release_blocks to optimize the kernel 2013-02-07 16:44:56 +01:00
dir.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ext2.h userns: Convert ext2 to use kuid/kgid where appropriate. 2012-05-15 14:59:26 -07:00
file.c
ialloc.c ext2: Fix BUG_ON in evict() on inode deletion 2013-03-13 15:23:44 +01:00
inode.c ext2: Fix BUG_ON in evict() on inode deletion 2013-03-13 15:23:44 +01:00
ioctl.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
Kconfig
Makefile
namei.c don't expose I_NEW inodes via dentry->d_inode 2012-07-23 00:00:58 +04:00
super.c fs: Limit sys_mount to only request filesystem modules. 2013-03-03 19:36:31 -08:00
symlink.c
xattr_security.c migrate ext2_fs.h guts to fs/ext2/ext2.h 2012-03-31 16:03:16 -04:00
xattr_trusted.c migrate ext2_fs.h guts to fs/ext2/ext2.h 2012-03-31 16:03:16 -04:00
xattr_user.c ext2/3/4: delete unneeded includes of module.h 2012-01-09 13:52:10 +01:00
xattr.c Ext2: return ENOMEM rather than EIO if sb_getblk fails 2013-01-21 11:19:57 +01:00
xattr.h
xip.c migrate ext2_fs.h guts to fs/ext2/ext2.h 2012-03-31 16:03:16 -04:00
xip.h