linux/fs/ext3
Linus Torvalds de329820e9 ext3: fix broken handling of EXT3_STATE_NEW
In commit 9df93939b7 ("ext3: Use bitops to read/modify
EXT3_I(inode)->i_state") ext3 changed its internal 'i_state' variable to
use bitops for its state handling.  However, unline the same ext4
change, it didn't actually change the name of the field when it changed
the semantics of it.

As a result, an old use of 'i_state' remained in fs/ext3/ialloc.c that
initialized the field to EXT3_STATE_NEW.  And that does not work
_at_all_ when we're now working with individually named bits rather than
values that get masked.  So the code tried to mark the state to be new,
but in actual fact set the field to EXT3_STATE_JDATA.  Which makes no
sense at all, and screws up all the code that checks whether the inode
was newly allocated.

In particular, it made the xattr code unhappy, and caused various random
behavior, like apparently

	https://bugzilla.redhat.com/show_bug.cgi?id=577911

So fix the initialization, and rename the field to match ext4 so that we
don't have this happen again.

Cc: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Daniel J Walsh <dwalsh@redhat.com>
Cc: Eric Paris <eparis@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-29 14:30:19 -07:00
..
Kconfig ext3: Update Kconfig description of EXT3_DEFAULTS_TO_ORDERED 2009-08-24 16:48:32 +02:00
Makefile [PATCH] ext3: uninline large functions 2006-12-07 08:39:35 -08:00
acl.c sanitize xattr handler prototypes 2009-12-16 12:16:49 -05:00
acl.h ext[234]: move over to 'check_acl' permission model 2009-09-08 11:09:04 -07:00
balloc.c dquot: cleanup space allocation / freeing routines 2010-03-05 00:20:28 +01:00
bitmap.c fs: mark nibblemap const 2007-10-17 08:42:47 -07:00
dir.c ext3: Get rid of extenddisksize parameter of ext3_get_blocks_handle() 2009-07-15 21:30:46 +02:00
ext3_jbd.c ext3: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:45 -07:00
file.c dquot: cleanup dquot initialize routine 2010-03-05 00:20:30 +01:00
fsync.c ext3: Wait for proper transaction commit on fsync 2009-11-11 15:22:49 +01:00
hash.c ext3: Add support for non-native signed/unsigned htree hash algorithms 2008-10-28 13:21:55 -04:00
ialloc.c ext3: fix broken handling of EXT3_STATE_NEW 2010-03-29 14:30:19 -07:00
inode.c ext3: fix broken handling of EXT3_STATE_NEW 2010-03-29 14:30:19 -07:00
ioctl.c ext3: remove the BKL in ext3/ioctl.c 2009-04-02 19:04:52 -07:00
namei.c dquot: cleanup dquot initialize routine 2010-03-05 00:20:30 +01:00
namei.h
resize.c ext3: Replace lock/unlock_super() with an explicit lock for resizing 2009-12-23 13:44:12 +01:00
super.c Merge branch 'for-next' into for-linus 2010-03-08 16:55:37 +01:00
symlink.c [PATCH] mark struct inode_operations const 1 2007-02-12 09:48:46 -08:00
xattr.c dquot: cleanup space allocation / freeing routines 2010-03-05 00:20:28 +01:00
xattr.h make ext3_xattr_list() static 2008-04-28 08:58:44 -07:00
xattr_security.c sanitize xattr handler prototypes 2009-12-16 12:16:49 -05:00
xattr_trusted.c sanitize xattr handler prototypes 2009-12-16 12:16:49 -05:00
xattr_user.c sanitize xattr handler prototypes 2009-12-16 12:16:49 -05:00