add patch fix-setting-of-referenced-bit-in-ext4_es_lookup_extent
[ext4-patch-queue.git] / remove-i_ioend_count
blob4b7172af52c8c33cd464b8cd3432a9f6d8cdb770
1 ext4: remove i_ioend_count
3 From: Jan Kara <jack@suse.cz>
5 Remove counter of pending io ends as it is unused.
7 Signed-off-by: Jan Kara <jack@suse.cz>
8 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
9 ---
10  fs/ext4/ext4.h    | 7 +------
11  fs/ext4/inode.c   | 3 ---
12  fs/ext4/page-io.c | 4 ----
13  fs/ext4/super.c   | 1 -
14  4 files changed, 1 insertion(+), 14 deletions(-)
16 diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
17 index 29d51505a9d2..00fed23dedf5 100644
18 --- a/fs/ext4/ext4.h
19 +++ b/fs/ext4/ext4.h
20 @@ -1024,13 +1024,8 @@ struct ext4_inode_info {
21          * transaction reserved
22          */
23         struct list_head i_rsv_conversion_list;
24 -       /*
25 -        * Completed IOs that need unwritten extents handling and don't have
26 -        * transaction reserved
27 -        */
28 -       atomic_t i_ioend_count; /* Number of outstanding io_end structs */
29 -       atomic_t i_unwritten; /* Nr. of inflight conversions pending */
30         struct work_struct i_rsv_conversion_work;
31 +       atomic_t i_unwritten; /* Nr. of inflight conversions pending */
33         spinlock_t i_block_reservation_lock;
35 diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
36 index ef411c4f11f8..c74c8e7c377b 100644
37 --- a/fs/ext4/inode.c
38 +++ b/fs/ext4/inode.c
39 @@ -216,7 +216,6 @@ void ext4_evict_inode(struct inode *inode)
40                 }
41                 truncate_inode_pages_final(&inode->i_data);
43 -               WARN_ON(atomic_read(&EXT4_I(inode)->i_ioend_count));
44                 goto no_delete;
45         }
47 @@ -228,8 +227,6 @@ void ext4_evict_inode(struct inode *inode)
48                 ext4_begin_ordered_truncate(inode, 0);
49         truncate_inode_pages_final(&inode->i_data);
51 -       WARN_ON(atomic_read(&EXT4_I(inode)->i_ioend_count));
53         /*
54          * Protect us against freezing - iput() caller didn't have to have any
55          * protection against it
56 diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
57 index 090b3498638e..349d7aa04fe7 100644
58 --- a/fs/ext4/page-io.c
59 +++ b/fs/ext4/page-io.c
60 @@ -128,9 +128,6 @@ static void ext4_release_io_end(ext4_io_end_t *io_end)
61         BUG_ON(io_end->flag & EXT4_IO_END_UNWRITTEN);
62         WARN_ON(io_end->handle);
64 -       if (atomic_dec_and_test(&EXT4_I(io_end->inode)->i_ioend_count))
65 -               wake_up_all(ext4_ioend_wq(io_end->inode));
67         for (bio = io_end->bio; bio; bio = next_bio) {
68                 next_bio = bio->bi_private;
69                 ext4_finish_bio(bio);
70 @@ -265,7 +262,6 @@ ext4_io_end_t *ext4_init_io_end(struct inode *inode, gfp_t flags)
71  {
72         ext4_io_end_t *io = kmem_cache_zalloc(io_end_cachep, flags);
73         if (io) {
74 -               atomic_inc(&EXT4_I(inode)->i_ioend_count);
75                 io->inode = inode;
76                 INIT_LIST_HEAD(&io->list);
77                 atomic_set(&io->count, 1);
78 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
79 index 6d8a01b4f535..e3872174875a 100644
80 --- a/fs/ext4/super.c
81 +++ b/fs/ext4/super.c
82 @@ -944,7 +944,6 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)
83         spin_lock_init(&ei->i_completed_io_lock);
84         ei->i_sync_tid = 0;
85         ei->i_datasync_tid = 0;
86 -       atomic_set(&ei->i_ioend_count, 0);
87         atomic_set(&ei->i_unwritten, 0);
88         INIT_WORK(&ei->i_rsv_conversion_work, ext4_end_io_rsv_work);
89  #ifdef CONFIG_EXT4_FS_ENCRYPTION
90 -- 
91 2.6.2