1 ext4: remove EXT4_STATE_ORDERED_MODE
3 From: Jan Kara <jack@suse.cz>
5 This flag is just duplicating what ext4_should_order_data() tells you
6 and is used in a single place. Furthermore it doesn't reflect changes to
7 inode data journalling flag so it may be possibly misleading. Just
10 Signed-off-by: Jan Kara <jack@suse.cz>
11 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 fs/ext4/inode.c | 5 +----
15 2 files changed, 1 insertion(+), 5 deletions(-)
17 diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
18 index c04743519865..8647d1253903 100644
21 @@ -1526,7 +1526,6 @@ enum {
22 EXT4_STATE_DIOREAD_LOCK, /* Disable support for dio read
24 EXT4_STATE_MAY_INLINE_DATA, /* may have in-inode data */
25 - EXT4_STATE_ORDERED_MODE, /* data=ordered mode */
26 EXT4_STATE_EXT_PRECACHED, /* extents have been precached */
29 diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
30 index 747b0e64b9d2..8ffba0ec3b80 100644
33 @@ -3541,10 +3541,7 @@ void ext4_set_aops(struct inode *inode)
35 switch (ext4_inode_journal_mode(inode)) {
36 case EXT4_INODE_ORDERED_DATA_MODE:
37 - ext4_set_inode_state(inode, EXT4_STATE_ORDERED_MODE);
39 case EXT4_INODE_WRITEBACK_DATA_MODE:
40 - ext4_clear_inode_state(inode, EXT4_STATE_ORDERED_MODE);
42 case EXT4_INODE_JOURNAL_DATA_MODE:
43 inode->i_mapping->a_ops = &ext4_journalled_aops;
44 @@ -3637,7 +3634,7 @@ static int __ext4_block_zero_page_range(handle_t *handle,
47 mark_buffer_dirty(bh);
48 - if (ext4_test_inode_state(inode, EXT4_STATE_ORDERED_MODE))
49 + if (ext4_should_order_data(inode))
50 err = ext4_jbd2_file_inode(handle, inode);