ext4: Use bitops to read/modify EXT4_I(inode)->i_state
authorTheodore Ts'o <tytso@mit.edu>
Sun, 24 Jan 2010 19:34:07 +0000 (14:34 -0500)
committerMatt Sealey <matt@genesi-usa.com>
Mon, 29 Nov 2010 22:57:55 +0000 (16:57 -0600)
commit4a7b4ab0b2f6deebdf1513b13dbaa348494d6d0b
tree8a5d8c51d4c2aac175f489c5e1f8c9e27c931056
parentccaf06fab79fb803f0d3ace90e470901f089a5de
ext4: Use bitops to read/modify EXT4_I(inode)->i_state

At several places we modify EXT4_I(inode)->i_state without holding
i_mutex (ext4_release_file, ext4_bmap, ext4_journalled_writepage,
ext4_do_update_inode, ...). These modifications are racy and we can
lose updates to i_state. So convert handling of i_state to use bitops
which are atomic.

Cc: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/file.c
fs/ext4/ialloc.c
fs/ext4/inode.c
fs/ext4/migrate.c
fs/ext4/xattr.c