aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/ext4.h7
-rw-r--r--fs/ext4/inode.c3
-rw-r--r--fs/ext4/page-io.c4
-rw-r--r--fs/ext4/super.c1
4 files changed, 1 insertions, 14 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 9f3156c38b16..70b8e0409566 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1024,13 +1024,8 @@ struct ext4_inode_info {
1024 * transaction reserved 1024 * transaction reserved
1025 */ 1025 */
1026 struct list_head i_rsv_conversion_list; 1026 struct list_head i_rsv_conversion_list;
1027 /*
1028 * Completed IOs that need unwritten extents handling and don't have
1029 * transaction reserved
1030 */
1031 atomic_t i_ioend_count; /* Number of outstanding io_end structs */
1032 atomic_t i_unwritten; /* Nr. of inflight conversions pending */
1033 struct work_struct i_rsv_conversion_work; 1027 struct work_struct i_rsv_conversion_work;
1028 atomic_t i_unwritten; /* Nr. of inflight conversions pending */
1034 1029
1035 spinlock_t i_block_reservation_lock; 1030 spinlock_t i_block_reservation_lock;
1036 1031
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index c67c16e59a71..971892d7c213 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -216,7 +216,6 @@ void ext4_evict_inode(struct inode *inode)
216 } 216 }
217 truncate_inode_pages_final(&inode->i_data); 217 truncate_inode_pages_final(&inode->i_data);
218 218
219 WARN_ON(atomic_read(&EXT4_I(inode)->i_ioend_count));
220 goto no_delete; 219 goto no_delete;
221 } 220 }
222 221
@@ -228,8 +227,6 @@ void ext4_evict_inode(struct inode *inode)
228 ext4_begin_ordered_truncate(inode, 0); 227 ext4_begin_ordered_truncate(inode, 0);
229 truncate_inode_pages_final(&inode->i_data); 228 truncate_inode_pages_final(&inode->i_data);
230 229
231 WARN_ON(atomic_read(&EXT4_I(inode)->i_ioend_count));
232
233 /* 230 /*
234 * Protect us against freezing - iput() caller didn't have to have any 231 * Protect us against freezing - iput() caller didn't have to have any
235 * protection against it 232 * protection against it
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index 090b3498638e..349d7aa04fe7 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -128,9 +128,6 @@ static void ext4_release_io_end(ext4_io_end_t *io_end)
128 BUG_ON(io_end->flag & EXT4_IO_END_UNWRITTEN); 128 BUG_ON(io_end->flag & EXT4_IO_END_UNWRITTEN);
129 WARN_ON(io_end->handle); 129 WARN_ON(io_end->handle);
130 130
131 if (atomic_dec_and_test(&EXT4_I(io_end->inode)->i_ioend_count))
132 wake_up_all(ext4_ioend_wq(io_end->inode));
133
134 for (bio = io_end->bio; bio; bio = next_bio) { 131 for (bio = io_end->bio; bio; bio = next_bio) {
135 next_bio = bio->bi_private; 132 next_bio = bio->bi_private;
136 ext4_finish_bio(bio); 133 ext4_finish_bio(bio);
@@ -265,7 +262,6 @@ ext4_io_end_t *ext4_init_io_end(struct inode *inode, gfp_t flags)
265{ 262{
266 ext4_io_end_t *io = kmem_cache_zalloc(io_end_cachep, flags); 263 ext4_io_end_t *io = kmem_cache_zalloc(io_end_cachep, flags);
267 if (io) { 264 if (io) {
268 atomic_inc(&EXT4_I(inode)->i_ioend_count);
269 io->inode = inode; 265 io->inode = inode;
270 INIT_LIST_HEAD(&io->list); 266 INIT_LIST_HEAD(&io->list);
271 atomic_set(&io->count, 1); 267 atomic_set(&io->count, 1);
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4d5756024e98..de02a9ef45dd 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -942,7 +942,6 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)
942 spin_lock_init(&ei->i_completed_io_lock); 942 spin_lock_init(&ei->i_completed_io_lock);
943 ei->i_sync_tid = 0; 943 ei->i_sync_tid = 0;
944 ei->i_datasync_tid = 0; 944 ei->i_datasync_tid = 0;
945 atomic_set(&ei->i_ioend_count, 0);
946 atomic_set(&ei->i_unwritten, 0); 945 atomic_set(&ei->i_unwritten, 0);
947 INIT_WORK(&ei->i_rsv_conversion_work, ext4_end_io_rsv_work); 946 INIT_WORK(&ei->i_rsv_conversion_work, ext4_end_io_rsv_work);
948#ifdef CONFIG_EXT4_FS_ENCRYPTION 947#ifdef CONFIG_EXT4_FS_ENCRYPTION