aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-05-03 08:48:02 -0400
committerFengguang Wu <fengguang.wu@intel.com>2012-05-06 01:43:41 -0400
commitdbd5768f87ff6fb0a4fe09c4d7b6c4a24de99430 (patch)
tree42ea94ea733538f797aa745945fc43c4d1b89217
parent7994e6f7254354e03028a11f98a27bd67dace9f1 (diff)
vfs: Rename end_writeback() to clear_inode()
After we moved inode_sync_wait() from end_writeback() it doesn't make sense to call the function end_writeback() anymore. Rename it to clear_inode() which well says what the function really does - set I_CLEAR flag. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
-rw-r--r--Documentation/filesystems/porting16
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c2
-rw-r--r--arch/s390/hypfs/inode.c2
-rw-r--r--fs/9p/vfs_inode.c2
-rw-r--r--fs/affs/inode.c2
-rw-r--r--fs/afs/inode.c2
-rw-r--r--fs/autofs4/inode.c2
-rw-r--r--fs/bfs/inode.c2
-rw-r--r--fs/binfmt_misc.c2
-rw-r--r--fs/block_dev.c2
-rw-r--r--fs/btrfs/inode.c2
-rw-r--r--fs/cifs/cifsfs.c2
-rw-r--r--fs/coda/inode.c2
-rw-r--r--fs/ecryptfs/super.c2
-rw-r--r--fs/exofs/inode.c4
-rw-r--r--fs/ext2/inode.c2
-rw-r--r--fs/ext3/inode.c6
-rw-r--r--fs/ext4/super.c2
-rw-r--r--fs/fat/inode.c2
-rw-r--r--fs/freevxfs/vxfs_inode.c2
-rw-r--r--fs/fuse/inode.c2
-rw-r--r--fs/gfs2/super.c2
-rw-r--r--fs/hfs/inode.c2
-rw-r--r--fs/hfsplus/super.c2
-rw-r--r--fs/hostfs/hostfs_kern.c2
-rw-r--r--fs/hpfs/inode.c2
-rw-r--r--fs/hppfs/hppfs.c2
-rw-r--r--fs/hugetlbfs/inode.c2
-rw-r--r--fs/inode.c6
-rw-r--r--fs/jffs2/fs.c2
-rw-r--r--fs/jfs/inode.c2
-rw-r--r--fs/logfs/readwrite.c2
-rw-r--r--fs/minix/inode.c2
-rw-r--r--fs/ncpfs/inode.c2
-rw-r--r--fs/nfs/inode.c4
-rw-r--r--fs/nilfs2/inode.c4
-rw-r--r--fs/ntfs/inode.c2
-rw-r--r--fs/ocfs2/dlmfs/dlmfs.c2
-rw-r--r--fs/ocfs2/inode.c2
-rw-r--r--fs/omfs/inode.c2
-rw-r--r--fs/proc/inode.c2
-rw-r--r--fs/pstore/inode.c2
-rw-r--r--fs/reiserfs/inode.c4
-rw-r--r--fs/sysfs/inode.c2
-rw-r--r--fs/sysv/inode.c2
-rw-r--r--fs/ubifs/super.c2
-rw-r--r--fs/udf/inode.c2
-rw-r--r--fs/ufs/inode.c2
-rw-r--r--fs/xfs/xfs_super.c2
-rw-r--r--include/linux/fs.h6
-rw-r--r--ipc/mqueue.c2
-rw-r--r--mm/shmem.c2
52 files changed, 68 insertions, 70 deletions
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 74acd9618819..8c91d1057d9a 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -297,7 +297,8 @@ in the beginning of ->setattr unconditionally.
297be used instead. It gets called whenever the inode is evicted, whether it has 297be used instead. It gets called whenever the inode is evicted, whether it has
298remaining links or not. Caller does *not* evict the pagecache or inode-associated 298remaining links or not. Caller does *not* evict the pagecache or inode-associated
299metadata buffers; getting rid of those is responsibility of method, as it had 299metadata buffers; getting rid of those is responsibility of method, as it had
300been for ->delete_inode(). 300been for ->delete_inode(). Caller makes sure async writeback cannot be running
301for the inode while (or after) ->evict_inode() is called.
301 302
302 ->drop_inode() returns int now; it's called on final iput() with 303 ->drop_inode() returns int now; it's called on final iput() with
303inode->i_lock held and it returns true if filesystems wants the inode to be 304inode->i_lock held and it returns true if filesystems wants the inode to be
@@ -306,14 +307,11 @@ updated appropriately. generic_delete_inode() is also alive and it consists
306simply of return 1. Note that all actual eviction work is done by caller after 307simply of return 1. Note that all actual eviction work is done by caller after
307->drop_inode() returns. 308->drop_inode() returns.
308 309
309 clear_inode() is gone; use end_writeback() instead. As before, it must 310 As before, clear_inode() must be called exactly once on each call of
310be called exactly once on each call of ->evict_inode() (as it used to be for 311->evict_inode() (as it used to be for each call of ->delete_inode()). Unlike
311each call of ->delete_inode()). Unlike before, if you are using inode-associated 312before, if you are using inode-associated metadata buffers (i.e.
312metadata buffers (i.e. mark_buffer_dirty_inode()), it's your responsibility to 313mark_buffer_dirty_inode()), it's your responsibility to call
313call invalidate_inode_buffers() before end_writeback(). 314invalidate_inode_buffers() before clear_inode().
314 No async writeback (and thus no calls of ->write_inode()) will happen
315after end_writeback() returns, so actions that should not overlap with ->write_inode()
316(e.g. freeing on-disk inode if i_nlink is 0) ought to be done after that call.
317 315
318 NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out 316 NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out
319if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput() 317if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput()
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 1d75c92ea8fb..66519d263da7 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -151,7 +151,7 @@ static void
151spufs_evict_inode(struct inode *inode) 151spufs_evict_inode(struct inode *inode)
152{ 152{
153 struct spufs_inode_info *ei = SPUFS_I(inode); 153 struct spufs_inode_info *ei = SPUFS_I(inode);
154 end_writeback(inode); 154 clear_inode(inode);
155 if (ei->i_ctx) 155 if (ei->i_ctx)
156 put_spu_context(ei->i_ctx); 156 put_spu_context(ei->i_ctx);
157 if (ei->i_gang) 157 if (ei->i_gang)
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index 6a2cb560e968..73dae8b9b77a 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -115,7 +115,7 @@ static struct inode *hypfs_make_inode(struct super_block *sb, umode_t mode)
115 115
116static void hypfs_evict_inode(struct inode *inode) 116static void hypfs_evict_inode(struct inode *inode)
117{ 117{
118 end_writeback(inode); 118 clear_inode(inode);
119 kfree(inode->i_private); 119 kfree(inode->i_private);
120} 120}
121 121
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 014c8dd62962..57ccb7537dae 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -448,7 +448,7 @@ void v9fs_evict_inode(struct inode *inode)
448 struct v9fs_inode *v9inode = V9FS_I(inode); 448 struct v9fs_inode *v9inode = V9FS_I(inode);
449 449
450 truncate_inode_pages(inode->i_mapping, 0); 450 truncate_inode_pages(inode->i_mapping, 0);
451 end_writeback(inode); 451 clear_inode(inode);
452 filemap_fdatawrite(inode->i_mapping); 452 filemap_fdatawrite(inode->i_mapping);
453 453
454#ifdef CONFIG_9P_FSCACHE 454#ifdef CONFIG_9P_FSCACHE
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index 88a4b0b50058..8bc4a59f4e7e 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -264,7 +264,7 @@ affs_evict_inode(struct inode *inode)
264 } 264 }
265 265
266 invalidate_inode_buffers(inode); 266 invalidate_inode_buffers(inode);
267 end_writeback(inode); 267 clear_inode(inode);
268 affs_free_prealloc(inode); 268 affs_free_prealloc(inode);
269 cache_page = (unsigned long)AFFS_I(inode)->i_lc; 269 cache_page = (unsigned long)AFFS_I(inode)->i_lc;
270 if (cache_page) { 270 if (cache_page) {
diff --git a/fs/afs/inode.c b/fs/afs/inode.c
index d890ae3b2ce6..95cffd38239f 100644
--- a/fs/afs/inode.c
+++ b/fs/afs/inode.c
@@ -423,7 +423,7 @@ void afs_evict_inode(struct inode *inode)
423 ASSERTCMP(inode->i_ino, ==, vnode->fid.vnode); 423 ASSERTCMP(inode->i_ino, ==, vnode->fid.vnode);
424 424
425 truncate_inode_pages(&inode->i_data, 0); 425 truncate_inode_pages(&inode->i_data, 0);
426 end_writeback(inode); 426 clear_inode(inode);
427 427
428 afs_give_up_callback(vnode); 428 afs_give_up_callback(vnode);
429 429
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index d8dc002e9cc3..df31ddb58228 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -101,7 +101,7 @@ static int autofs4_show_options(struct seq_file *m, struct dentry *root)
101 101
102static void autofs4_evict_inode(struct inode *inode) 102static void autofs4_evict_inode(struct inode *inode)
103{ 103{
104 end_writeback(inode); 104 clear_inode(inode);
105 kfree(inode->i_private); 105 kfree(inode->i_private);
106} 106}
107 107
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index e23dc7c8b884..9870417c26e7 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -174,7 +174,7 @@ static void bfs_evict_inode(struct inode *inode)
174 174
175 truncate_inode_pages(&inode->i_data, 0); 175 truncate_inode_pages(&inode->i_data, 0);
176 invalidate_inode_buffers(inode); 176 invalidate_inode_buffers(inode);
177 end_writeback(inode); 177 clear_inode(inode);
178 178
179 if (inode->i_nlink) 179 if (inode->i_nlink)
180 return; 180 return;
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index 613aa0618235..790b3cddca67 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -505,7 +505,7 @@ static struct inode *bm_get_inode(struct super_block *sb, int mode)
505 505
506static void bm_evict_inode(struct inode *inode) 506static void bm_evict_inode(struct inode *inode)
507{ 507{
508 end_writeback(inode); 508 clear_inode(inode);
509 kfree(inode->i_private); 509 kfree(inode->i_private);
510} 510}
511 511
diff --git a/fs/block_dev.c b/fs/block_dev.c
index e08f6a20a5bb..d8a7959a9654 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -487,7 +487,7 @@ static void bdev_evict_inode(struct inode *inode)
487 struct list_head *p; 487 struct list_head *p;
488 truncate_inode_pages(&inode->i_data, 0); 488 truncate_inode_pages(&inode->i_data, 0);
489 invalidate_inode_buffers(inode); /* is it needed here? */ 489 invalidate_inode_buffers(inode); /* is it needed here? */
490 end_writeback(inode); 490 clear_inode(inode);
491 spin_lock(&bdev_lock); 491 spin_lock(&bdev_lock);
492 while ( (p = bdev->bd_inodes.next) != &bdev->bd_inodes ) { 492 while ( (p = bdev->bd_inodes.next) != &bdev->bd_inodes ) {
493 __bd_forget(list_entry(p, struct inode, i_devices)); 493 __bd_forget(list_entry(p, struct inode, i_devices));
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 115bc05e42b0..5c058c4d3283 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3756,7 +3756,7 @@ void btrfs_evict_inode(struct inode *inode)
3756 btrfs_end_transaction(trans, root); 3756 btrfs_end_transaction(trans, root);
3757 btrfs_btree_balance_dirty(root, nr); 3757 btrfs_btree_balance_dirty(root, nr);
3758no_delete: 3758no_delete:
3759 end_writeback(inode); 3759 clear_inode(inode);
3760 return; 3760 return;
3761} 3761}
3762 3762
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index d34212822444..acb138f0eba0 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -272,7 +272,7 @@ static void
272cifs_evict_inode(struct inode *inode) 272cifs_evict_inode(struct inode *inode)
273{ 273{
274 truncate_inode_pages(&inode->i_data, 0); 274 truncate_inode_pages(&inode->i_data, 0);
275 end_writeback(inode); 275 clear_inode(inode);
276 cifs_fscache_release_inode_cookie(inode); 276 cifs_fscache_release_inode_cookie(inode);
277} 277}
278 278
diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index 2870597b5c9d..f1813120d753 100644
--- a/fs/coda/inode.c
+++ b/fs/coda/inode.c
@@ -244,7 +244,7 @@ static void coda_put_super(struct super_block *sb)
244static void coda_evict_inode(struct inode *inode) 244static void coda_evict_inode(struct inode *inode)
245{ 245{
246 truncate_inode_pages(&inode->i_data, 0); 246 truncate_inode_pages(&inode->i_data, 0);
247 end_writeback(inode); 247 clear_inode(inode);
248 coda_cache_clear_inode(inode); 248 coda_cache_clear_inode(inode);
249} 249}
250 250
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c
index 2dd946b636d2..e879cf8ff0b1 100644
--- a/fs/ecryptfs/super.c
+++ b/fs/ecryptfs/super.c
@@ -133,7 +133,7 @@ static int ecryptfs_statfs(struct dentry *dentry, struct kstatfs *buf)
133static void ecryptfs_evict_inode(struct inode *inode) 133static void ecryptfs_evict_inode(struct inode *inode)
134{ 134{
135 truncate_inode_pages(&inode->i_data, 0); 135 truncate_inode_pages(&inode->i_data, 0);
136 end_writeback(inode); 136 clear_inode(inode);
137 iput(ecryptfs_inode_to_lower(inode)); 137 iput(ecryptfs_inode_to_lower(inode));
138} 138}
139 139
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index ea5e1f97806a..5badb0c039de 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -1473,7 +1473,7 @@ void exofs_evict_inode(struct inode *inode)
1473 goto no_delete; 1473 goto no_delete;
1474 1474
1475 inode->i_size = 0; 1475 inode->i_size = 0;
1476 end_writeback(inode); 1476 clear_inode(inode);
1477 1477
1478 /* if we are deleting an obj that hasn't been created yet, wait. 1478 /* if we are deleting an obj that hasn't been created yet, wait.
1479 * This also makes sure that create_done cannot be called with an 1479 * This also makes sure that create_done cannot be called with an
@@ -1503,5 +1503,5 @@ void exofs_evict_inode(struct inode *inode)
1503 return; 1503 return;
1504 1504
1505no_delete: 1505no_delete:
1506 end_writeback(inode); 1506 clear_inode(inode);
1507} 1507}
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 740cad8dcd8d..37b8bf606f45 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -90,7 +90,7 @@ void ext2_evict_inode(struct inode * inode)
90 } 90 }
91 91
92 invalidate_inode_buffers(inode); 92 invalidate_inode_buffers(inode);
93 end_writeback(inode); 93 clear_inode(inode);
94 94
95 ext2_discard_reservation(inode); 95 ext2_discard_reservation(inode);
96 rsv = EXT2_I(inode)->i_block_alloc_info; 96 rsv = EXT2_I(inode)->i_block_alloc_info;
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 10d7812f6021..ca5eb6189ee9 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -272,18 +272,18 @@ void ext3_evict_inode (struct inode *inode)
272 if (ext3_mark_inode_dirty(handle, inode)) { 272 if (ext3_mark_inode_dirty(handle, inode)) {
273 /* If that failed, just dquot_drop() and be done with that */ 273 /* If that failed, just dquot_drop() and be done with that */
274 dquot_drop(inode); 274 dquot_drop(inode);
275 end_writeback(inode); 275 clear_inode(inode);
276 } else { 276 } else {
277 ext3_xattr_delete_inode(handle, inode); 277 ext3_xattr_delete_inode(handle, inode);
278 dquot_free_inode(inode); 278 dquot_free_inode(inode);
279 dquot_drop(inode); 279 dquot_drop(inode);
280 end_writeback(inode); 280 clear_inode(inode);
281 ext3_free_inode(handle, inode); 281 ext3_free_inode(handle, inode);
282 } 282 }
283 ext3_journal_stop(handle); 283 ext3_journal_stop(handle);
284 return; 284 return;
285no_delete: 285no_delete:
286 end_writeback(inode); 286 clear_inode(inode);
287 dquot_drop(inode); 287 dquot_drop(inode);
288} 288}
289 289
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index ceebaf853beb..2484f560483a 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1007,7 +1007,7 @@ static void destroy_inodecache(void)
1007void ext4_clear_inode(struct inode *inode) 1007void ext4_clear_inode(struct inode *inode)
1008{ 1008{
1009 invalidate_inode_buffers(inode); 1009 invalidate_inode_buffers(inode);
1010 end_writeback(inode); 1010 clear_inode(inode);
1011 dquot_drop(inode); 1011 dquot_drop(inode);
1012 ext4_discard_preallocations(inode); 1012 ext4_discard_preallocations(inode);
1013 if (EXT4_I(inode)->jinode) { 1013 if (EXT4_I(inode)->jinode) {
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 21687e31acc0..b3d290c1b513 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -454,7 +454,7 @@ static void fat_evict_inode(struct inode *inode)
454 fat_truncate_blocks(inode, 0); 454 fat_truncate_blocks(inode, 0);
455 } 455 }
456 invalidate_inode_buffers(inode); 456 invalidate_inode_buffers(inode);
457 end_writeback(inode); 457 clear_inode(inode);
458 fat_cache_inval_inode(inode); 458 fat_cache_inval_inode(inode);
459 fat_detach(inode); 459 fat_detach(inode);
460} 460}
diff --git a/fs/freevxfs/vxfs_inode.c b/fs/freevxfs/vxfs_inode.c
index cf9ef918a2a9..ef67c95f12d4 100644
--- a/fs/freevxfs/vxfs_inode.c
+++ b/fs/freevxfs/vxfs_inode.c
@@ -355,6 +355,6 @@ void
355vxfs_evict_inode(struct inode *ip) 355vxfs_evict_inode(struct inode *ip)
356{ 356{
357 truncate_inode_pages(&ip->i_data, 0); 357 truncate_inode_pages(&ip->i_data, 0);
358 end_writeback(ip); 358 clear_inode(ip);
359 call_rcu(&ip->i_rcu, vxfs_i_callback); 359 call_rcu(&ip->i_rcu, vxfs_i_callback);
360} 360}
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 4aec5995867e..87e61152b34e 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -122,7 +122,7 @@ static void fuse_destroy_inode(struct inode *inode)
122static void fuse_evict_inode(struct inode *inode) 122static void fuse_evict_inode(struct inode *inode)
123{ 123{
124 truncate_inode_pages(&inode->i_data, 0); 124 truncate_inode_pages(&inode->i_data, 0);
125 end_writeback(inode); 125 clear_inode(inode);
126 if (inode->i_sb->s_flags & MS_ACTIVE) { 126 if (inode->i_sb->s_flags & MS_ACTIVE) {
127 struct fuse_conn *fc = get_fuse_conn(inode); 127 struct fuse_conn *fc = get_fuse_conn(inode);
128 struct fuse_inode *fi = get_fuse_inode(inode); 128 struct fuse_inode *fi = get_fuse_inode(inode);
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 6172fa77ad59..713e621c240b 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -1554,7 +1554,7 @@ out_unlock:
1554out: 1554out:
1555 /* Case 3 starts here */ 1555 /* Case 3 starts here */
1556 truncate_inode_pages(&inode->i_data, 0); 1556 truncate_inode_pages(&inode->i_data, 0);
1557 end_writeback(inode); 1557 clear_inode(inode);
1558 gfs2_dir_hash_inval(ip); 1558 gfs2_dir_hash_inval(ip);
1559 ip->i_gl->gl_object = NULL; 1559 ip->i_gl->gl_object = NULL;
1560 flush_delayed_work_sync(&ip->i_gl->gl_work); 1560 flush_delayed_work_sync(&ip->i_gl->gl_work);
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
index 737dbeb64320..761ec06354b4 100644
--- a/fs/hfs/inode.c
+++ b/fs/hfs/inode.c
@@ -532,7 +532,7 @@ out:
532void hfs_evict_inode(struct inode *inode) 532void hfs_evict_inode(struct inode *inode)
533{ 533{
534 truncate_inode_pages(&inode->i_data, 0); 534 truncate_inode_pages(&inode->i_data, 0);
535 end_writeback(inode); 535 clear_inode(inode);
536 if (HFS_IS_RSRC(inode) && HFS_I(inode)->rsrc_inode) { 536 if (HFS_IS_RSRC(inode) && HFS_I(inode)->rsrc_inode) {
537 HFS_I(HFS_I(inode)->rsrc_inode)->rsrc_inode = NULL; 537 HFS_I(HFS_I(inode)->rsrc_inode)->rsrc_inode = NULL;
538 iput(HFS_I(inode)->rsrc_inode); 538 iput(HFS_I(inode)->rsrc_inode);
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index ceb1c281eefb..a9bca4b8768b 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -154,7 +154,7 @@ static void hfsplus_evict_inode(struct inode *inode)
154{ 154{
155 dprint(DBG_INODE, "hfsplus_evict_inode: %lu\n", inode->i_ino); 155 dprint(DBG_INODE, "hfsplus_evict_inode: %lu\n", inode->i_ino);
156 truncate_inode_pages(&inode->i_data, 0); 156 truncate_inode_pages(&inode->i_data, 0);
157 end_writeback(inode); 157 clear_inode(inode);
158 if (HFSPLUS_IS_RSRC(inode)) { 158 if (HFSPLUS_IS_RSRC(inode)) {
159 HFSPLUS_I(HFSPLUS_I(inode)->rsrc_inode)->rsrc_inode = NULL; 159 HFSPLUS_I(HFSPLUS_I(inode)->rsrc_inode)->rsrc_inode = NULL;
160 iput(HFSPLUS_I(inode)->rsrc_inode); 160 iput(HFSPLUS_I(inode)->rsrc_inode);
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 07c516bfea76..2afa5bbccf9b 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -240,7 +240,7 @@ static struct inode *hostfs_alloc_inode(struct super_block *sb)
240static void hostfs_evict_inode(struct inode *inode) 240static void hostfs_evict_inode(struct inode *inode)
241{ 241{
242 truncate_inode_pages(&inode->i_data, 0); 242 truncate_inode_pages(&inode->i_data, 0);
243 end_writeback(inode); 243 clear_inode(inode);
244 if (HOSTFS_I(inode)->fd != -1) { 244 if (HOSTFS_I(inode)->fd != -1) {
245 close_file(&HOSTFS_I(inode)->fd); 245 close_file(&HOSTFS_I(inode)->fd);
246 HOSTFS_I(inode)->fd = -1; 246 HOSTFS_I(inode)->fd = -1;
diff --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c
index 3b2cec29972b..b43066cbdc6a 100644
--- a/fs/hpfs/inode.c
+++ b/fs/hpfs/inode.c
@@ -299,7 +299,7 @@ void hpfs_write_if_changed(struct inode *inode)
299void hpfs_evict_inode(struct inode *inode) 299void hpfs_evict_inode(struct inode *inode)
300{ 300{
301 truncate_inode_pages(&inode->i_data, 0); 301 truncate_inode_pages(&inode->i_data, 0);
302 end_writeback(inode); 302 clear_inode(inode);
303 if (!inode->i_nlink) { 303 if (!inode->i_nlink) {
304 hpfs_lock(inode->i_sb); 304 hpfs_lock(inode->i_sb);
305 hpfs_remove_fnode(inode->i_sb, inode->i_ino); 305 hpfs_remove_fnode(inode->i_sb, inode->i_ino);
diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c
index a80e45a690ac..d4f93b52cec5 100644
--- a/fs/hppfs/hppfs.c
+++ b/fs/hppfs/hppfs.c
@@ -614,7 +614,7 @@ static struct inode *hppfs_alloc_inode(struct super_block *sb)
614 614
615void hppfs_evict_inode(struct inode *ino) 615void hppfs_evict_inode(struct inode *ino)
616{ 616{
617 end_writeback(ino); 617 clear_inode(ino);
618 dput(HPPFS_I(ino)->proc_dentry); 618 dput(HPPFS_I(ino)->proc_dentry);
619 mntput(ino->i_sb->s_fs_info); 619 mntput(ino->i_sb->s_fs_info);
620} 620}
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 28cf06e4ec84..568193d5153c 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -393,7 +393,7 @@ static void truncate_hugepages(struct inode *inode, loff_t lstart)
393static void hugetlbfs_evict_inode(struct inode *inode) 393static void hugetlbfs_evict_inode(struct inode *inode)
394{ 394{
395 truncate_hugepages(inode, 0); 395 truncate_hugepages(inode, 0);
396 end_writeback(inode); 396 clear_inode(inode);
397} 397}
398 398
399static inline void 399static inline void
diff --git a/fs/inode.c b/fs/inode.c
index 501fc5daf6f4..02c0fa5e16a4 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -486,7 +486,7 @@ void __remove_inode_hash(struct inode *inode)
486} 486}
487EXPORT_SYMBOL(__remove_inode_hash); 487EXPORT_SYMBOL(__remove_inode_hash);
488 488
489void end_writeback(struct inode *inode) 489void clear_inode(struct inode *inode)
490{ 490{
491 might_sleep(); 491 might_sleep();
492 /* 492 /*
@@ -503,7 +503,7 @@ void end_writeback(struct inode *inode)
503 /* don't need i_lock here, no concurrent mods to i_state */ 503 /* don't need i_lock here, no concurrent mods to i_state */
504 inode->i_state = I_FREEING | I_CLEAR; 504 inode->i_state = I_FREEING | I_CLEAR;
505} 505}
506EXPORT_SYMBOL(end_writeback); 506EXPORT_SYMBOL(clear_inode);
507 507
508/* 508/*
509 * Free the inode passed in, removing it from the lists it is still connected 509 * Free the inode passed in, removing it from the lists it is still connected
@@ -537,7 +537,7 @@ static void evict(struct inode *inode)
537 } else { 537 } else {
538 if (inode->i_data.nrpages) 538 if (inode->i_data.nrpages)
539 truncate_inode_pages(&inode->i_data, 0); 539 truncate_inode_pages(&inode->i_data, 0);
540 end_writeback(inode); 540 clear_inode(inode);
541 } 541 }
542 if (S_ISBLK(inode->i_mode) && inode->i_bdev) 542 if (S_ISBLK(inode->i_mode) && inode->i_bdev)
543 bd_forget(inode); 543 bd_forget(inode);
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index bb6f993ebca9..3d3092eda811 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -240,7 +240,7 @@ void jffs2_evict_inode (struct inode *inode)
240 jffs2_dbg(1, "%s(): ino #%lu mode %o\n", 240 jffs2_dbg(1, "%s(): ino #%lu mode %o\n",
241 __func__, inode->i_ino, inode->i_mode); 241 __func__, inode->i_ino, inode->i_mode);
242 truncate_inode_pages(&inode->i_data, 0); 242 truncate_inode_pages(&inode->i_data, 0);
243 end_writeback(inode); 243 clear_inode(inode);
244 jffs2_do_clear_inode(c, f); 244 jffs2_do_clear_inode(c, f);
245} 245}
246 246
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index 77b69b27f825..4692bf3ca8cb 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -169,7 +169,7 @@ void jfs_evict_inode(struct inode *inode)
169 } else { 169 } else {
170 truncate_inode_pages(&inode->i_data, 0); 170 truncate_inode_pages(&inode->i_data, 0);
171 } 171 }
172 end_writeback(inode); 172 clear_inode(inode);
173 dquot_drop(inode); 173 dquot_drop(inode);
174} 174}
175 175
diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c
index e3ab5e5a904c..f1cb512c5019 100644
--- a/fs/logfs/readwrite.c
+++ b/fs/logfs/readwrite.c
@@ -2175,7 +2175,7 @@ void logfs_evict_inode(struct inode *inode)
2175 } 2175 }
2176 } 2176 }
2177 truncate_inode_pages(&inode->i_data, 0); 2177 truncate_inode_pages(&inode->i_data, 0);
2178 end_writeback(inode); 2178 clear_inode(inode);
2179 2179
2180 /* Cheaper version of write_inode. All changes are concealed in 2180 /* Cheaper version of write_inode. All changes are concealed in
2181 * aliases, which are moved back. No write to the medium happens. 2181 * aliases, which are moved back. No write to the medium happens.
diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index fcb05d2c6b5f..2a503ad020d5 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -32,7 +32,7 @@ static void minix_evict_inode(struct inode *inode)
32 minix_truncate(inode); 32 minix_truncate(inode);
33 } 33 }
34 invalidate_inode_buffers(inode); 34 invalidate_inode_buffers(inode);
35 end_writeback(inode); 35 clear_inode(inode);
36 if (!inode->i_nlink) 36 if (!inode->i_nlink)
37 minix_free_inode(inode); 37 minix_free_inode(inode);
38} 38}
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 87484fb8d177..333df07ae3bd 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -292,7 +292,7 @@ static void
292ncp_evict_inode(struct inode *inode) 292ncp_evict_inode(struct inode *inode)
293{ 293{
294 truncate_inode_pages(&inode->i_data, 0); 294 truncate_inode_pages(&inode->i_data, 0);
295 end_writeback(inode); 295 clear_inode(inode);
296 296
297 if (S_ISDIR(inode->i_mode)) { 297 if (S_ISDIR(inode->i_mode)) {
298 DDPRINTK("ncp_evict_inode: put directory %ld\n", inode->i_ino); 298 DDPRINTK("ncp_evict_inode: put directory %ld\n", inode->i_ino);
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index e8bbfa5b3500..c6073139b402 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -121,7 +121,7 @@ static void nfs_clear_inode(struct inode *inode)
121void nfs_evict_inode(struct inode *inode) 121void nfs_evict_inode(struct inode *inode)
122{ 122{
123 truncate_inode_pages(&inode->i_data, 0); 123 truncate_inode_pages(&inode->i_data, 0);
124 end_writeback(inode); 124 clear_inode(inode);
125 nfs_clear_inode(inode); 125 nfs_clear_inode(inode);
126} 126}
127 127
@@ -1500,7 +1500,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1500void nfs4_evict_inode(struct inode *inode) 1500void nfs4_evict_inode(struct inode *inode)
1501{ 1501{
1502 truncate_inode_pages(&inode->i_data, 0); 1502 truncate_inode_pages(&inode->i_data, 0);
1503 end_writeback(inode); 1503 clear_inode(inode);
1504 pnfs_return_layout(inode); 1504 pnfs_return_layout(inode);
1505 pnfs_destroy_layout(NFS_I(inode)); 1505 pnfs_destroy_layout(NFS_I(inode));
1506 /* If we are holding a delegation, return it! */ 1506 /* If we are holding a delegation, return it! */
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index 8f7b95ac1f7e..7cc64465ec26 100644
--- a/fs/nilfs2/inode.c
+++ b/fs/nilfs2/inode.c
@@ -734,7 +734,7 @@ void nilfs_evict_inode(struct inode *inode)
734 if (inode->i_nlink || !ii->i_root || unlikely(is_bad_inode(inode))) { 734 if (inode->i_nlink || !ii->i_root || unlikely(is_bad_inode(inode))) {
735 if (inode->i_data.nrpages) 735 if (inode->i_data.nrpages)
736 truncate_inode_pages(&inode->i_data, 0); 736 truncate_inode_pages(&inode->i_data, 0);
737 end_writeback(inode); 737 clear_inode(inode);
738 nilfs_clear_inode(inode); 738 nilfs_clear_inode(inode);
739 return; 739 return;
740 } 740 }
@@ -746,7 +746,7 @@ void nilfs_evict_inode(struct inode *inode)
746 /* TODO: some of the following operations may fail. */ 746 /* TODO: some of the following operations may fail. */
747 nilfs_truncate_bmap(ii, 0); 747 nilfs_truncate_bmap(ii, 0);
748 nilfs_mark_inode_dirty(inode); 748 nilfs_mark_inode_dirty(inode);
749 end_writeback(inode); 749 clear_inode(inode);
750 750
751 ret = nilfs_ifile_delete_inode(ii->i_root->ifile, inode->i_ino); 751 ret = nilfs_ifile_delete_inode(ii->i_root->ifile, inode->i_ino);
752 if (!ret) 752 if (!ret)
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index 2eaa66652944..c6dbd3db6ca8 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -2258,7 +2258,7 @@ void ntfs_evict_big_inode(struct inode *vi)
2258 ntfs_inode *ni = NTFS_I(vi); 2258 ntfs_inode *ni = NTFS_I(vi);
2259 2259
2260 truncate_inode_pages(&vi->i_data, 0); 2260 truncate_inode_pages(&vi->i_data, 0);
2261 end_writeback(vi); 2261 clear_inode(vi);
2262 2262
2263#ifdef NTFS_RW 2263#ifdef NTFS_RW
2264 if (NInoDirty(ni)) { 2264 if (NInoDirty(ni)) {
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
index 3b5825ef3193..e31d6ae013ab 100644
--- a/fs/ocfs2/dlmfs/dlmfs.c
+++ b/fs/ocfs2/dlmfs/dlmfs.c
@@ -367,7 +367,7 @@ static void dlmfs_evict_inode(struct inode *inode)
367 int status; 367 int status;
368 struct dlmfs_inode_private *ip; 368 struct dlmfs_inode_private *ip;
369 369
370 end_writeback(inode); 370 clear_inode(inode);
371 371
372 mlog(0, "inode %lu\n", inode->i_ino); 372 mlog(0, "inode %lu\n", inode->i_ino);
373 373
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 17454a904d7b..735514ca400f 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -1069,7 +1069,7 @@ static void ocfs2_clear_inode(struct inode *inode)
1069 int status; 1069 int status;
1070 struct ocfs2_inode_info *oi = OCFS2_I(inode); 1070 struct ocfs2_inode_info *oi = OCFS2_I(inode);
1071 1071
1072 end_writeback(inode); 1072 clear_inode(inode);
1073 trace_ocfs2_clear_inode((unsigned long long)oi->ip_blkno, 1073 trace_ocfs2_clear_inode((unsigned long long)oi->ip_blkno,
1074 inode->i_nlink); 1074 inode->i_nlink);
1075 1075
diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c
index dbc842222589..e6213b3725d1 100644
--- a/fs/omfs/inode.c
+++ b/fs/omfs/inode.c
@@ -184,7 +184,7 @@ int omfs_sync_inode(struct inode *inode)
184static void omfs_evict_inode(struct inode *inode) 184static void omfs_evict_inode(struct inode *inode)
185{ 185{
186 truncate_inode_pages(&inode->i_data, 0); 186 truncate_inode_pages(&inode->i_data, 0);
187 end_writeback(inode); 187 clear_inode(inode);
188 188
189 if (inode->i_nlink) 189 if (inode->i_nlink)
190 return; 190 return;
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 205c92280838..29ab406b3704 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -33,7 +33,7 @@ static void proc_evict_inode(struct inode *inode)
33 const struct proc_ns_operations *ns_ops; 33 const struct proc_ns_operations *ns_ops;
34 34
35 truncate_inode_pages(&inode->i_data, 0); 35 truncate_inode_pages(&inode->i_data, 0);
36 end_writeback(inode); 36 clear_inode(inode);
37 37
38 /* Stop tracking associated processes */ 38 /* Stop tracking associated processes */
39 put_pid(PROC_I(inode)->pid); 39 put_pid(PROC_I(inode)->pid);
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index 19507889bb7f..aeb19e68e086 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -85,7 +85,7 @@ static void pstore_evict_inode(struct inode *inode)
85 struct pstore_private *p = inode->i_private; 85 struct pstore_private *p = inode->i_private;
86 unsigned long flags; 86 unsigned long flags;
87 87
88 end_writeback(inode); 88 clear_inode(inode);
89 if (p) { 89 if (p) {
90 spin_lock_irqsave(&allpstore_lock, flags); 90 spin_lock_irqsave(&allpstore_lock, flags);
91 list_del(&p->list); 91 list_del(&p->list);
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 494c315c7417..59d06871a850 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -76,14 +76,14 @@ void reiserfs_evict_inode(struct inode *inode)
76 ; 76 ;
77 } 77 }
78 out: 78 out:
79 end_writeback(inode); /* note this must go after the journal_end to prevent deadlock */ 79 clear_inode(inode); /* note this must go after the journal_end to prevent deadlock */
80 dquot_drop(inode); 80 dquot_drop(inode);
81 inode->i_blocks = 0; 81 inode->i_blocks = 0;
82 reiserfs_write_unlock_once(inode->i_sb, depth); 82 reiserfs_write_unlock_once(inode->i_sb, depth);
83 return; 83 return;
84 84
85no_delete: 85no_delete:
86 end_writeback(inode); 86 clear_inode(inode);
87 dquot_drop(inode); 87 dquot_drop(inode);
88} 88}
89 89
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index feb2d69396cf..b8ce6a98933f 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -310,7 +310,7 @@ void sysfs_evict_inode(struct inode *inode)
310 struct sysfs_dirent *sd = inode->i_private; 310 struct sysfs_dirent *sd = inode->i_private;
311 311
312 truncate_inode_pages(&inode->i_data, 0); 312 truncate_inode_pages(&inode->i_data, 0);
313 end_writeback(inode); 313 clear_inode(inode);
314 sysfs_put(sd); 314 sysfs_put(sd);
315} 315}
316 316
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c
index 3da5ce25faf0..08d0b2568cd3 100644
--- a/fs/sysv/inode.c
+++ b/fs/sysv/inode.c
@@ -316,7 +316,7 @@ static void sysv_evict_inode(struct inode *inode)
316 sysv_truncate(inode); 316 sysv_truncate(inode);
317 } 317 }
318 invalidate_inode_buffers(inode); 318 invalidate_inode_buffers(inode);
319 end_writeback(inode); 319 clear_inode(inode);
320 if (!inode->i_nlink) 320 if (!inode->i_nlink)
321 sysv_free_inode(inode); 321 sysv_free_inode(inode);
322} 322}
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 76e4e0566ad6..7bf60ae58ed4 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -378,7 +378,7 @@ out:
378 smp_wmb(); 378 smp_wmb();
379 } 379 }
380done: 380done:
381 end_writeback(inode); 381 clear_inode(inode);
382} 382}
383 383
384static void ubifs_dirty_inode(struct inode *inode, int flags) 384static void ubifs_dirty_inode(struct inode *inode, int flags)
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 7d7528008359..873e1bab9c4c 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -80,7 +80,7 @@ void udf_evict_inode(struct inode *inode)
80 } else 80 } else
81 truncate_inode_pages(&inode->i_data, 0); 81 truncate_inode_pages(&inode->i_data, 0);
82 invalidate_inode_buffers(inode); 82 invalidate_inode_buffers(inode);
83 end_writeback(inode); 83 clear_inode(inode);
84 if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB && 84 if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB &&
85 inode->i_size != iinfo->i_lenExtents) { 85 inode->i_size != iinfo->i_lenExtents) {
86 udf_warn(inode->i_sb, "Inode %lu (mode %o) has inode size %llu different from extent length %llu. Filesystem need not be standards compliant.\n", 86 udf_warn(inode->i_sb, "Inode %lu (mode %o) has inode size %llu different from extent length %llu. Filesystem need not be standards compliant.\n",
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index 7cdd3953d67e..dd7c89d8a1c1 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -895,7 +895,7 @@ void ufs_evict_inode(struct inode * inode)
895 } 895 }
896 896
897 invalidate_inode_buffers(inode); 897 invalidate_inode_buffers(inode);
898 end_writeback(inode); 898 clear_inode(inode);
899 899
900 if (want_delete) { 900 if (want_delete) {
901 lock_ufs(inode->i_sb); 901 lock_ufs(inode->i_sb);
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index dab9a5f6dfd6..5b806f23ad0a 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -926,7 +926,7 @@ xfs_fs_evict_inode(
926 trace_xfs_evict_inode(ip); 926 trace_xfs_evict_inode(ip);
927 927
928 truncate_inode_pages(&inode->i_data, 0); 928 truncate_inode_pages(&inode->i_data, 0);
929 end_writeback(inode); 929 clear_inode(inode);
930 XFS_STATS_INC(vn_rele); 930 XFS_STATS_INC(vn_rele);
931 XFS_STATS_INC(vn_remove); 931 XFS_STATS_INC(vn_remove);
932 XFS_STATS_DEC(vn_active); 932 XFS_STATS_DEC(vn_active);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 8de675523e46..c79316c79ee3 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1744,8 +1744,8 @@ struct super_operations {
1744 * I_FREEING Set when inode is about to be freed but still has dirty 1744 * I_FREEING Set when inode is about to be freed but still has dirty
1745 * pages or buffers attached or the inode itself is still 1745 * pages or buffers attached or the inode itself is still
1746 * dirty. 1746 * dirty.
1747 * I_CLEAR Added by end_writeback(). In this state the inode is clean 1747 * I_CLEAR Added by clear_inode(). In this state the inode is
1748 * and can be destroyed. Inode keeps I_FREEING. 1748 * clean and can be destroyed. Inode keeps I_FREEING.
1749 * 1749 *
1750 * Inodes that are I_WILL_FREE, I_FREEING or I_CLEAR are 1750 * Inodes that are I_WILL_FREE, I_FREEING or I_CLEAR are
1751 * prohibited for many purposes. iget() must wait for 1751 * prohibited for many purposes. iget() must wait for
@@ -2328,7 +2328,7 @@ extern unsigned int get_next_ino(void);
2328 2328
2329extern void __iget(struct inode * inode); 2329extern void __iget(struct inode * inode);
2330extern void iget_failed(struct inode *); 2330extern void iget_failed(struct inode *);
2331extern void end_writeback(struct inode *); 2331extern void clear_inode(struct inode *);
2332extern void __destroy_inode(struct inode *); 2332extern void __destroy_inode(struct inode *);
2333extern struct inode *new_inode_pseudo(struct super_block *sb); 2333extern struct inode *new_inode_pseudo(struct super_block *sb);
2334extern struct inode *new_inode(struct super_block *sb); 2334extern struct inode *new_inode(struct super_block *sb);
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 28bd64ddeda3..0032d9cccb7c 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -249,7 +249,7 @@ static void mqueue_evict_inode(struct inode *inode)
249 int i; 249 int i;
250 struct ipc_namespace *ipc_ns; 250 struct ipc_namespace *ipc_ns;
251 251
252 end_writeback(inode); 252 clear_inode(inode);
253 253
254 if (S_ISDIR(inode->i_mode)) 254 if (S_ISDIR(inode->i_mode))
255 return; 255 return;
diff --git a/mm/shmem.c b/mm/shmem.c
index f99ff3e50bd6..68412fa90fd0 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -597,7 +597,7 @@ static void shmem_evict_inode(struct inode *inode)
597 } 597 }
598 BUG_ON(inode->i_blocks); 598 BUG_ON(inode->i_blocks);
599 shmem_free_inode(inode->i_sb); 599 shmem_free_inode(inode->i_sb);
600 end_writeback(inode); 600 clear_inode(inode);
601} 601}
602 602
603/* 603/*