ext3: Use bitops to read/modify EXT3_I(inode)->i_state
authorJan Kara <jack@suse.cz>
Wed, 6 Jan 2010 20:58:48 +0000 (21:58 +0100)
committerJan Kara <jack@suse.cz>
Thu, 4 Mar 2010 23:20:20 +0000 (00:20 +0100)
commit9df93939b735dd273e49cbee290b9f4738500ef4
tree2840172239e13d1c0fea496755b8346a9b394336
parent26245c949c8473ea7352907b5a54bc34487eb87f
ext3: Use bitops to read/modify EXT3_I(inode)->i_state

At several places we modify EXT3_I(inode)->i_state without holding i_mutex
(ext3_release_file, ext3_bmap, ext3_journalled_writepage, ext3_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.

Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext3/file.c
fs/ext3/inode.c
fs/ext3/xattr.c
include/linux/ext3_fs.h
include/linux/ext3_fs_i.h