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>
This commit is contained in:
@@ -87,7 +87,7 @@ struct ext3_inode_info {
|
||||
* near to their parent directory's inode.
|
||||
*/
|
||||
__u32 i_block_group;
|
||||
__u32 i_state; /* Dynamic state flags for ext3 */
|
||||
unsigned long i_state; /* Dynamic state flags for ext3 */
|
||||
|
||||
/* block reservation info */
|
||||
struct ext3_block_alloc_info *i_block_alloc_info;
|
||||
|
Reference in New Issue
Block a user