diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2010-05-30 22:50:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-02 10:21:22 -0700 |
commit | b6eaf5813482cd0f7a26be329845518100097181 (patch) | |
tree | 99134d780a8bdaafb2d2eddd3052e4e723d01111 /fs/ext4/move_extent.c | |
parent | 714b56001acd9d382772f2bf89b8219ca50342c3 (diff) |
ext4: Use bitops to read/modify i_flags in struct ext4_inode_info
commit 12e9b892002d9af057655d35b44db8ee9243b0dc upstream (as of v2.6.34-git13)
At several places we modify EXT4_I(inode)->i_flags without holding
i_mutex (ext4_do_update_inode, ...). These modifications are racy and
we can lose updates to i_flags. So convert handling of i_flags to use
bitops which are atomic.
https://bugzilla.kernel.org/show_bug.cgi?id=15792
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/ext4/move_extent.c')
-rw-r--r-- | fs/ext4/move_extent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index 0362cfbe9a9b..5b14d11438b7 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c @@ -975,11 +975,11 @@ mext_check_arguments(struct inode *orig_inode, } /* Ext4 move extent supports only extent based file */ - if (!(EXT4_I(orig_inode)->i_flags & EXT4_EXTENTS_FL)) { + if (!(ext4_test_inode_flag(orig_inode, EXT4_INODE_EXTENTS))) { ext4_debug("ext4 move extent: orig file is not extents " "based file [ino:orig %lu]\n", orig_inode->i_ino); return -EOPNOTSUPP; - } else if (!(EXT4_I(donor_inode)->i_flags & EXT4_EXTENTS_FL)) { + } else if (!(ext4_test_inode_flag(donor_inode, EXT4_INODE_EXTENTS))) { ext4_debug("ext4 move extent: donor file is not extents " "based file [ino:donor %lu]\n", donor_inode->i_ino); return -EOPNOTSUPP; |