diff options
-rw-r--r-- | fs/9p/v9fs_vfs.h | 2 | ||||
-rw-r--r-- | fs/9p/vfs_inode.c | 4 | ||||
-rw-r--r-- | fs/9p/vfs_super.c | 4 | ||||
-rw-r--r-- | fs/afs/inode.c | 5 | ||||
-rw-r--r-- | fs/afs/internal.h | 2 | ||||
-rw-r--r-- | fs/afs/super.c | 2 | ||||
-rw-r--r-- | fs/binfmt_misc.c | 5 | ||||
-rw-r--r-- | fs/block_dev.c | 7 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 6 | ||||
-rw-r--r-- | fs/coda/inode.c | 8 | ||||
-rw-r--r-- | fs/ecryptfs/super.c | 8 | ||||
-rw-r--r-- | fs/freevxfs/vxfs_extern.h | 2 | ||||
-rw-r--r-- | fs/freevxfs/vxfs_inode.c | 8 | ||||
-rw-r--r-- | fs/freevxfs/vxfs_super.c | 2 | ||||
-rw-r--r-- | fs/fuse/inode.c | 6 | ||||
-rw-r--r-- | fs/hfs/hfs_fs.h | 2 | ||||
-rw-r--r-- | fs/hfs/inode.c | 4 | ||||
-rw-r--r-- | fs/hfs/super.c | 2 | ||||
-rw-r--r-- | fs/hfsplus/super.c | 8 | ||||
-rw-r--r-- | fs/inode.c | 2 | ||||
-rw-r--r-- | fs/jffs2/fs.c | 6 | ||||
-rw-r--r-- | fs/jffs2/os-linux.h | 2 | ||||
-rw-r--r-- | fs/jffs2/super.c | 2 | ||||
-rw-r--r-- | fs/jffs2/xattr.c | 2 | ||||
-rw-r--r-- | fs/nfs/inode.c | 13 | ||||
-rw-r--r-- | fs/nfs/internal.h | 4 | ||||
-rw-r--r-- | fs/nfs/super.c | 4 | ||||
-rw-r--r-- | fs/ntfs/inode.c | 7 | ||||
-rw-r--r-- | fs/ntfs/inode.h | 2 | ||||
-rw-r--r-- | fs/ntfs/super.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlmfs/dlmfs.c | 7 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 8 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_trace.h | 2 | ||||
-rw-r--r-- | include/linux/fs.h | 3 |
34 files changed, 94 insertions, 59 deletions
diff --git a/fs/9p/v9fs_vfs.h b/fs/9p/v9fs_vfs.h index 32ef4009d030..3d056fe01b50 100644 --- a/fs/9p/v9fs_vfs.h +++ b/fs/9p/v9fs_vfs.h | |||
@@ -52,7 +52,7 @@ void v9fs_destroy_inode(struct inode *inode); | |||
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | struct inode *v9fs_get_inode(struct super_block *sb, int mode); | 54 | struct inode *v9fs_get_inode(struct super_block *sb, int mode); |
55 | void v9fs_clear_inode(struct inode *inode); | 55 | void v9fs_evict_inode(struct inode *inode); |
56 | ino_t v9fs_qid2ino(struct p9_qid *qid); | 56 | ino_t v9fs_qid2ino(struct p9_qid *qid); |
57 | void v9fs_stat2inode(struct p9_wstat *, struct inode *, struct super_block *); | 57 | void v9fs_stat2inode(struct p9_wstat *, struct inode *, struct super_block *); |
58 | int v9fs_dir_release(struct inode *inode, struct file *filp); | 58 | int v9fs_dir_release(struct inode *inode, struct file *filp); |
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 4b3ad6ac9a41..b81ce206508d 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -387,8 +387,10 @@ error: | |||
387 | * @inode: inode to release | 387 | * @inode: inode to release |
388 | * | 388 | * |
389 | */ | 389 | */ |
390 | void v9fs_clear_inode(struct inode *inode) | 390 | void v9fs_evict_inode(struct inode *inode) |
391 | { | 391 | { |
392 | truncate_inode_pages(inode->i_mapping, 0); | ||
393 | end_writeback(inode); | ||
392 | filemap_fdatawrite(inode->i_mapping); | 394 | filemap_fdatawrite(inode->i_mapping); |
393 | 395 | ||
394 | #ifdef CONFIG_9P_FSCACHE | 396 | #ifdef CONFIG_9P_FSCACHE |
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index be74d020436e..c6122bf547df 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c | |||
@@ -257,7 +257,7 @@ static const struct super_operations v9fs_super_ops = { | |||
257 | .destroy_inode = v9fs_destroy_inode, | 257 | .destroy_inode = v9fs_destroy_inode, |
258 | #endif | 258 | #endif |
259 | .statfs = simple_statfs, | 259 | .statfs = simple_statfs, |
260 | .clear_inode = v9fs_clear_inode, | 260 | .evict_inode = v9fs_evict_inode, |
261 | .show_options = generic_show_options, | 261 | .show_options = generic_show_options, |
262 | .umount_begin = v9fs_umount_begin, | 262 | .umount_begin = v9fs_umount_begin, |
263 | }; | 263 | }; |
@@ -268,7 +268,7 @@ static const struct super_operations v9fs_super_ops_dotl = { | |||
268 | .destroy_inode = v9fs_destroy_inode, | 268 | .destroy_inode = v9fs_destroy_inode, |
269 | #endif | 269 | #endif |
270 | .statfs = v9fs_statfs, | 270 | .statfs = v9fs_statfs, |
271 | .clear_inode = v9fs_clear_inode, | 271 | .evict_inode = v9fs_evict_inode, |
272 | .show_options = generic_show_options, | 272 | .show_options = generic_show_options, |
273 | .umount_begin = v9fs_umount_begin, | 273 | .umount_begin = v9fs_umount_begin, |
274 | }; | 274 | }; |
diff --git a/fs/afs/inode.c b/fs/afs/inode.c index d00b312e3110..320ffef11574 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c | |||
@@ -316,7 +316,7 @@ int afs_getattr(struct vfsmount *mnt, struct dentry *dentry, | |||
316 | /* | 316 | /* |
317 | * clear an AFS inode | 317 | * clear an AFS inode |
318 | */ | 318 | */ |
319 | void afs_clear_inode(struct inode *inode) | 319 | void afs_evict_inode(struct inode *inode) |
320 | { | 320 | { |
321 | struct afs_permits *permits; | 321 | struct afs_permits *permits; |
322 | struct afs_vnode *vnode; | 322 | struct afs_vnode *vnode; |
@@ -335,6 +335,9 @@ void afs_clear_inode(struct inode *inode) | |||
335 | 335 | ||
336 | ASSERTCMP(inode->i_ino, ==, vnode->fid.vnode); | 336 | ASSERTCMP(inode->i_ino, ==, vnode->fid.vnode); |
337 | 337 | ||
338 | truncate_inode_pages(&inode->i_data, 0); | ||
339 | end_writeback(inode); | ||
340 | |||
338 | afs_give_up_callback(vnode); | 341 | afs_give_up_callback(vnode); |
339 | 342 | ||
340 | if (vnode->server) { | 343 | if (vnode->server) { |
diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 5f679b77ce24..8679089ce9a1 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h | |||
@@ -565,7 +565,7 @@ extern void afs_zap_data(struct afs_vnode *); | |||
565 | extern int afs_validate(struct afs_vnode *, struct key *); | 565 | extern int afs_validate(struct afs_vnode *, struct key *); |
566 | extern int afs_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 566 | extern int afs_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
567 | extern int afs_setattr(struct dentry *, struct iattr *); | 567 | extern int afs_setattr(struct dentry *, struct iattr *); |
568 | extern void afs_clear_inode(struct inode *); | 568 | extern void afs_evict_inode(struct inode *); |
569 | 569 | ||
570 | /* | 570 | /* |
571 | * main.c | 571 | * main.c |
diff --git a/fs/afs/super.c b/fs/afs/super.c index e932e5a3a0c1..9cf80f02da16 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
@@ -49,7 +49,7 @@ static const struct super_operations afs_super_ops = { | |||
49 | .statfs = afs_statfs, | 49 | .statfs = afs_statfs, |
50 | .alloc_inode = afs_alloc_inode, | 50 | .alloc_inode = afs_alloc_inode, |
51 | .destroy_inode = afs_destroy_inode, | 51 | .destroy_inode = afs_destroy_inode, |
52 | .clear_inode = afs_clear_inode, | 52 | .evict_inode = afs_evict_inode, |
53 | .put_super = afs_put_super, | 53 | .put_super = afs_put_super, |
54 | .show_options = generic_show_options, | 54 | .show_options = generic_show_options, |
55 | }; | 55 | }; |
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index c4e83537ead7..9e60fd201716 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
@@ -502,8 +502,9 @@ static struct inode *bm_get_inode(struct super_block *sb, int mode) | |||
502 | return inode; | 502 | return inode; |
503 | } | 503 | } |
504 | 504 | ||
505 | static void bm_clear_inode(struct inode *inode) | 505 | static void bm_evict_inode(struct inode *inode) |
506 | { | 506 | { |
507 | end_writeback(inode); | ||
507 | kfree(inode->i_private); | 508 | kfree(inode->i_private); |
508 | } | 509 | } |
509 | 510 | ||
@@ -685,7 +686,7 @@ static const struct file_operations bm_status_operations = { | |||
685 | 686 | ||
686 | static const struct super_operations s_ops = { | 687 | static const struct super_operations s_ops = { |
687 | .statfs = simple_statfs, | 688 | .statfs = simple_statfs, |
688 | .clear_inode = bm_clear_inode, | 689 | .evict_inode = bm_evict_inode, |
689 | }; | 690 | }; |
690 | 691 | ||
691 | static int bm_fill_super(struct super_block * sb, void * data, int silent) | 692 | static int bm_fill_super(struct super_block * sb, void * data, int silent) |
diff --git a/fs/block_dev.c b/fs/block_dev.c index 63c9d6076205..de7b4d0c7e30 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -426,10 +426,13 @@ static inline void __bd_forget(struct inode *inode) | |||
426 | inode->i_mapping = &inode->i_data; | 426 | inode->i_mapping = &inode->i_data; |
427 | } | 427 | } |
428 | 428 | ||
429 | static void bdev_clear_inode(struct inode *inode) | 429 | static void bdev_evict_inode(struct inode *inode) |
430 | { | 430 | { |
431 | struct block_device *bdev = &BDEV_I(inode)->bdev; | 431 | struct block_device *bdev = &BDEV_I(inode)->bdev; |
432 | struct list_head *p; | 432 | struct list_head *p; |
433 | truncate_inode_pages(&inode->i_data, 0); | ||
434 | invalidate_inode_buffers(inode); /* is it needed here? */ | ||
435 | end_writeback(inode); | ||
433 | spin_lock(&bdev_lock); | 436 | spin_lock(&bdev_lock); |
434 | while ( (p = bdev->bd_inodes.next) != &bdev->bd_inodes ) { | 437 | while ( (p = bdev->bd_inodes.next) != &bdev->bd_inodes ) { |
435 | __bd_forget(list_entry(p, struct inode, i_devices)); | 438 | __bd_forget(list_entry(p, struct inode, i_devices)); |
@@ -443,7 +446,7 @@ static const struct super_operations bdev_sops = { | |||
443 | .alloc_inode = bdev_alloc_inode, | 446 | .alloc_inode = bdev_alloc_inode, |
444 | .destroy_inode = bdev_destroy_inode, | 447 | .destroy_inode = bdev_destroy_inode, |
445 | .drop_inode = generic_delete_inode, | 448 | .drop_inode = generic_delete_inode, |
446 | .clear_inode = bdev_clear_inode, | 449 | .evict_inode = bdev_evict_inode, |
447 | }; | 450 | }; |
448 | 451 | ||
449 | static int bd_get_sb(struct file_system_type *fs_type, | 452 | static int bd_get_sb(struct file_system_type *fs_type, |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 20914f5627dd..5574a42b7bb6 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -330,8 +330,10 @@ cifs_destroy_inode(struct inode *inode) | |||
330 | } | 330 | } |
331 | 331 | ||
332 | static void | 332 | static void |
333 | cifs_clear_inode(struct inode *inode) | 333 | cifs_evict_inode(struct inode *inode) |
334 | { | 334 | { |
335 | truncate_inode_pages(&inode->i_data, 0); | ||
336 | end_writeback(inode); | ||
335 | cifs_fscache_release_inode_cookie(inode); | 337 | cifs_fscache_release_inode_cookie(inode); |
336 | } | 338 | } |
337 | 339 | ||
@@ -495,7 +497,7 @@ static const struct super_operations cifs_super_ops = { | |||
495 | .alloc_inode = cifs_alloc_inode, | 497 | .alloc_inode = cifs_alloc_inode, |
496 | .destroy_inode = cifs_destroy_inode, | 498 | .destroy_inode = cifs_destroy_inode, |
497 | .drop_inode = cifs_drop_inode, | 499 | .drop_inode = cifs_drop_inode, |
498 | .clear_inode = cifs_clear_inode, | 500 | .evict_inode = cifs_evict_inode, |
499 | /* .delete_inode = cifs_delete_inode, */ /* Do not need above | 501 | /* .delete_inode = cifs_delete_inode, */ /* Do not need above |
500 | function unless later we add lazy close of inodes or unless the | 502 | function unless later we add lazy close of inodes or unless the |
501 | kernel forgets to call us with the same number of releases (closes) | 503 | kernel forgets to call us with the same number of releases (closes) |
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index d97f9935a028..6526e6f21ecf 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include "coda_int.h" | 35 | #include "coda_int.h" |
36 | 36 | ||
37 | /* VFS super_block ops */ | 37 | /* VFS super_block ops */ |
38 | static void coda_clear_inode(struct inode *); | 38 | static void coda_evict_inode(struct inode *); |
39 | static void coda_put_super(struct super_block *); | 39 | static void coda_put_super(struct super_block *); |
40 | static int coda_statfs(struct dentry *dentry, struct kstatfs *buf); | 40 | static int coda_statfs(struct dentry *dentry, struct kstatfs *buf); |
41 | 41 | ||
@@ -93,7 +93,7 @@ static const struct super_operations coda_super_operations = | |||
93 | { | 93 | { |
94 | .alloc_inode = coda_alloc_inode, | 94 | .alloc_inode = coda_alloc_inode, |
95 | .destroy_inode = coda_destroy_inode, | 95 | .destroy_inode = coda_destroy_inode, |
96 | .clear_inode = coda_clear_inode, | 96 | .evict_inode = coda_evict_inode, |
97 | .put_super = coda_put_super, | 97 | .put_super = coda_put_super, |
98 | .statfs = coda_statfs, | 98 | .statfs = coda_statfs, |
99 | .remount_fs = coda_remount, | 99 | .remount_fs = coda_remount, |
@@ -224,8 +224,10 @@ static void coda_put_super(struct super_block *sb) | |||
224 | printk("Coda: Bye bye.\n"); | 224 | printk("Coda: Bye bye.\n"); |
225 | } | 225 | } |
226 | 226 | ||
227 | static void coda_clear_inode(struct inode *inode) | 227 | static void coda_evict_inode(struct inode *inode) |
228 | { | 228 | { |
229 | truncate_inode_pages(&inode->i_data, 0); | ||
230 | end_writeback(inode); | ||
229 | coda_cache_clear_inode(inode); | 231 | coda_cache_clear_inode(inode); |
230 | } | 232 | } |
231 | 233 | ||
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c index 0435886e4a9f..4b5de6c6e0fa 100644 --- a/fs/ecryptfs/super.c +++ b/fs/ecryptfs/super.c | |||
@@ -122,7 +122,7 @@ static int ecryptfs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
122 | } | 122 | } |
123 | 123 | ||
124 | /** | 124 | /** |
125 | * ecryptfs_clear_inode | 125 | * ecryptfs_evict_inode |
126 | * @inode - The ecryptfs inode | 126 | * @inode - The ecryptfs inode |
127 | * | 127 | * |
128 | * Called by iput() when the inode reference count reached zero | 128 | * Called by iput() when the inode reference count reached zero |
@@ -131,8 +131,10 @@ static int ecryptfs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
131 | * on the inode free list. We use this to drop out reference to the | 131 | * on the inode free list. We use this to drop out reference to the |
132 | * lower inode. | 132 | * lower inode. |
133 | */ | 133 | */ |
134 | static void ecryptfs_clear_inode(struct inode *inode) | 134 | static void ecryptfs_evict_inode(struct inode *inode) |
135 | { | 135 | { |
136 | truncate_inode_pages(&inode->i_data, 0); | ||
137 | end_writeback(inode); | ||
136 | iput(ecryptfs_inode_to_lower(inode)); | 138 | iput(ecryptfs_inode_to_lower(inode)); |
137 | } | 139 | } |
138 | 140 | ||
@@ -184,6 +186,6 @@ const struct super_operations ecryptfs_sops = { | |||
184 | .drop_inode = generic_delete_inode, | 186 | .drop_inode = generic_delete_inode, |
185 | .statfs = ecryptfs_statfs, | 187 | .statfs = ecryptfs_statfs, |
186 | .remount_fs = NULL, | 188 | .remount_fs = NULL, |
187 | .clear_inode = ecryptfs_clear_inode, | 189 | .evict_inode = ecryptfs_evict_inode, |
188 | .show_options = ecryptfs_show_options | 190 | .show_options = ecryptfs_show_options |
189 | }; | 191 | }; |
diff --git a/fs/freevxfs/vxfs_extern.h b/fs/freevxfs/vxfs_extern.h index 50ab5eecb99b..881aa3d217f0 100644 --- a/fs/freevxfs/vxfs_extern.h +++ b/fs/freevxfs/vxfs_extern.h | |||
@@ -63,7 +63,7 @@ extern void vxfs_put_fake_inode(struct inode *); | |||
63 | extern struct vxfs_inode_info * vxfs_blkiget(struct super_block *, u_long, ino_t); | 63 | extern struct vxfs_inode_info * vxfs_blkiget(struct super_block *, u_long, ino_t); |
64 | extern struct vxfs_inode_info * vxfs_stiget(struct super_block *, ino_t); | 64 | extern struct vxfs_inode_info * vxfs_stiget(struct super_block *, ino_t); |
65 | extern struct inode * vxfs_iget(struct super_block *, ino_t); | 65 | extern struct inode * vxfs_iget(struct super_block *, ino_t); |
66 | extern void vxfs_clear_inode(struct inode *); | 66 | extern void vxfs_evict_inode(struct inode *); |
67 | 67 | ||
68 | /* vxfs_lookup.c */ | 68 | /* vxfs_lookup.c */ |
69 | extern const struct inode_operations vxfs_dir_inode_ops; | 69 | extern const struct inode_operations vxfs_dir_inode_ops; |
diff --git a/fs/freevxfs/vxfs_inode.c b/fs/freevxfs/vxfs_inode.c index 03a6ea5e99f7..79d1b4ea13e7 100644 --- a/fs/freevxfs/vxfs_inode.c +++ b/fs/freevxfs/vxfs_inode.c | |||
@@ -337,15 +337,17 @@ vxfs_iget(struct super_block *sbp, ino_t ino) | |||
337 | } | 337 | } |
338 | 338 | ||
339 | /** | 339 | /** |
340 | * vxfs_clear_inode - remove inode from main memory | 340 | * vxfs_evict_inode - remove inode from main memory |
341 | * @ip: inode to discard. | 341 | * @ip: inode to discard. |
342 | * | 342 | * |
343 | * Description: | 343 | * Description: |
344 | * vxfs_clear_inode() is called on the final iput and frees the private | 344 | * vxfs_evict_inode() is called on the final iput and frees the private |
345 | * inode area. | 345 | * inode area. |
346 | */ | 346 | */ |
347 | void | 347 | void |
348 | vxfs_clear_inode(struct inode *ip) | 348 | vxfs_evict_inode(struct inode *ip) |
349 | { | 349 | { |
350 | truncate_inode_pages(&ip->i_data, 0); | ||
351 | end_writeback(ip); | ||
350 | kmem_cache_free(vxfs_inode_cachep, ip->i_private); | 352 | kmem_cache_free(vxfs_inode_cachep, ip->i_private); |
351 | } | 353 | } |
diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c index 1e8af939b3e4..1f3ffd93b357 100644 --- a/fs/freevxfs/vxfs_super.c +++ b/fs/freevxfs/vxfs_super.c | |||
@@ -61,7 +61,7 @@ static int vxfs_statfs(struct dentry *, struct kstatfs *); | |||
61 | static int vxfs_remount(struct super_block *, int *, char *); | 61 | static int vxfs_remount(struct super_block *, int *, char *); |
62 | 62 | ||
63 | static const struct super_operations vxfs_super_ops = { | 63 | static const struct super_operations vxfs_super_ops = { |
64 | .clear_inode = vxfs_clear_inode, | 64 | .evict_inode = vxfs_evict_inode, |
65 | .put_super = vxfs_put_super, | 65 | .put_super = vxfs_put_super, |
66 | .statfs = vxfs_statfs, | 66 | .statfs = vxfs_statfs, |
67 | .remount_fs = vxfs_remount, | 67 | .remount_fs = vxfs_remount, |
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index ec14d19ce501..da9e6e11374c 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -122,8 +122,10 @@ void fuse_send_forget(struct fuse_conn *fc, struct fuse_req *req, | |||
122 | fuse_request_send_noreply(fc, req); | 122 | fuse_request_send_noreply(fc, req); |
123 | } | 123 | } |
124 | 124 | ||
125 | static void fuse_clear_inode(struct inode *inode) | 125 | static void fuse_evict_inode(struct inode *inode) |
126 | { | 126 | { |
127 | truncate_inode_pages(&inode->i_data, 0); | ||
128 | end_writeback(inode); | ||
127 | if (inode->i_sb->s_flags & MS_ACTIVE) { | 129 | if (inode->i_sb->s_flags & MS_ACTIVE) { |
128 | struct fuse_conn *fc = get_fuse_conn(inode); | 130 | struct fuse_conn *fc = get_fuse_conn(inode); |
129 | struct fuse_inode *fi = get_fuse_inode(inode); | 131 | struct fuse_inode *fi = get_fuse_inode(inode); |
@@ -736,7 +738,7 @@ static const struct export_operations fuse_export_operations = { | |||
736 | static const struct super_operations fuse_super_operations = { | 738 | static const struct super_operations fuse_super_operations = { |
737 | .alloc_inode = fuse_alloc_inode, | 739 | .alloc_inode = fuse_alloc_inode, |
738 | .destroy_inode = fuse_destroy_inode, | 740 | .destroy_inode = fuse_destroy_inode, |
739 | .clear_inode = fuse_clear_inode, | 741 | .evict_inode = fuse_evict_inode, |
740 | .drop_inode = generic_delete_inode, | 742 | .drop_inode = generic_delete_inode, |
741 | .remount_fs = fuse_remount_fs, | 743 | .remount_fs = fuse_remount_fs, |
742 | .put_super = fuse_put_super, | 744 | .put_super = fuse_put_super, |
diff --git a/fs/hfs/hfs_fs.h b/fs/hfs/hfs_fs.h index fe35e3b626c4..4f55651aaa51 100644 --- a/fs/hfs/hfs_fs.h +++ b/fs/hfs/hfs_fs.h | |||
@@ -193,7 +193,7 @@ extern int hfs_inode_setattr(struct dentry *, struct iattr *); | |||
193 | extern void hfs_inode_read_fork(struct inode *inode, struct hfs_extent *ext, | 193 | extern void hfs_inode_read_fork(struct inode *inode, struct hfs_extent *ext, |
194 | __be32 log_size, __be32 phys_size, u32 clump_size); | 194 | __be32 log_size, __be32 phys_size, u32 clump_size); |
195 | extern struct inode *hfs_iget(struct super_block *, struct hfs_cat_key *, hfs_cat_rec *); | 195 | extern struct inode *hfs_iget(struct super_block *, struct hfs_cat_key *, hfs_cat_rec *); |
196 | extern void hfs_clear_inode(struct inode *); | 196 | extern void hfs_evict_inode(struct inode *); |
197 | extern void hfs_delete_inode(struct inode *); | 197 | extern void hfs_delete_inode(struct inode *); |
198 | 198 | ||
199 | /* attr.c */ | 199 | /* attr.c */ |
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index 93ceec8fbb8f..397b7adc7ce6 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c | |||
@@ -531,8 +531,10 @@ out: | |||
531 | return NULL; | 531 | return NULL; |
532 | } | 532 | } |
533 | 533 | ||
534 | void hfs_clear_inode(struct inode *inode) | 534 | void hfs_evict_inode(struct inode *inode) |
535 | { | 535 | { |
536 | truncate_inode_pages(&inode->i_data, 0); | ||
537 | end_writeback(inode); | ||
536 | if (HFS_IS_RSRC(inode) && HFS_I(inode)->rsrc_inode) { | 538 | if (HFS_IS_RSRC(inode) && HFS_I(inode)->rsrc_inode) { |
537 | HFS_I(HFS_I(inode)->rsrc_inode)->rsrc_inode = NULL; | 539 | HFS_I(HFS_I(inode)->rsrc_inode)->rsrc_inode = NULL; |
538 | iput(HFS_I(inode)->rsrc_inode); | 540 | iput(HFS_I(inode)->rsrc_inode); |
diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 0a81eb7111f3..34235d4bf08b 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c | |||
@@ -181,7 +181,7 @@ static const struct super_operations hfs_super_operations = { | |||
181 | .alloc_inode = hfs_alloc_inode, | 181 | .alloc_inode = hfs_alloc_inode, |
182 | .destroy_inode = hfs_destroy_inode, | 182 | .destroy_inode = hfs_destroy_inode, |
183 | .write_inode = hfs_write_inode, | 183 | .write_inode = hfs_write_inode, |
184 | .clear_inode = hfs_clear_inode, | 184 | .evict_inode = hfs_evict_inode, |
185 | .put_super = hfs_put_super, | 185 | .put_super = hfs_put_super, |
186 | .write_super = hfs_write_super, | 186 | .write_super = hfs_write_super, |
187 | .sync_fs = hfs_sync_fs, | 187 | .sync_fs = hfs_sync_fs, |
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index a32c241e4e45..3b55c050c742 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c | |||
@@ -145,9 +145,11 @@ static int hfsplus_write_inode(struct inode *inode, | |||
145 | return ret; | 145 | return ret; |
146 | } | 146 | } |
147 | 147 | ||
148 | static void hfsplus_clear_inode(struct inode *inode) | 148 | static void hfsplus_evict_inode(struct inode *inode) |
149 | { | 149 | { |
150 | dprint(DBG_INODE, "hfsplus_clear_inode: %lu\n", inode->i_ino); | 150 | dprint(DBG_INODE, "hfsplus_evict_inode: %lu\n", inode->i_ino); |
151 | truncate_inode_pages(&inode->i_data, 0); | ||
152 | end_writeback(inode); | ||
151 | if (HFSPLUS_IS_RSRC(inode)) { | 153 | if (HFSPLUS_IS_RSRC(inode)) { |
152 | HFSPLUS_I(HFSPLUS_I(inode).rsrc_inode).rsrc_inode = NULL; | 154 | HFSPLUS_I(HFSPLUS_I(inode).rsrc_inode).rsrc_inode = NULL; |
153 | iput(HFSPLUS_I(inode).rsrc_inode); | 155 | iput(HFSPLUS_I(inode).rsrc_inode); |
@@ -293,7 +295,7 @@ static const struct super_operations hfsplus_sops = { | |||
293 | .alloc_inode = hfsplus_alloc_inode, | 295 | .alloc_inode = hfsplus_alloc_inode, |
294 | .destroy_inode = hfsplus_destroy_inode, | 296 | .destroy_inode = hfsplus_destroy_inode, |
295 | .write_inode = hfsplus_write_inode, | 297 | .write_inode = hfsplus_write_inode, |
296 | .clear_inode = hfsplus_clear_inode, | 298 | .evict_inode = hfsplus_evict_inode, |
297 | .put_super = hfsplus_put_super, | 299 | .put_super = hfsplus_put_super, |
298 | .write_super = hfsplus_write_super, | 300 | .write_super = hfsplus_write_super, |
299 | .sync_fs = hfsplus_sync_fs, | 301 | .sync_fs = hfsplus_sync_fs, |
diff --git a/fs/inode.c b/fs/inode.c index 0e077619cbf6..5daeb0b8fb59 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -317,8 +317,6 @@ static void evict(struct inode *inode) | |||
317 | truncate_inode_pages(&inode->i_data, 0); | 317 | truncate_inode_pages(&inode->i_data, 0); |
318 | invalidate_inode_buffers(inode); | 318 | invalidate_inode_buffers(inode); |
319 | end_writeback(inode); | 319 | end_writeback(inode); |
320 | if (op->clear_inode) | ||
321 | op->clear_inode(inode); | ||
322 | } | 320 | } |
323 | if (S_ISBLK(inode->i_mode) && inode->i_bdev) | 321 | if (S_ISBLK(inode->i_mode) && inode->i_bdev) |
324 | bd_forget(inode); | 322 | bd_forget(inode); |
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index 1b2426604fe3..ac0638f04969 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c | |||
@@ -225,7 +225,7 @@ int jffs2_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
225 | } | 225 | } |
226 | 226 | ||
227 | 227 | ||
228 | void jffs2_clear_inode (struct inode *inode) | 228 | void jffs2_evict_inode (struct inode *inode) |
229 | { | 229 | { |
230 | /* We can forget about this inode for now - drop all | 230 | /* We can forget about this inode for now - drop all |
231 | * the nodelists associated with it, etc. | 231 | * the nodelists associated with it, etc. |
@@ -233,7 +233,9 @@ void jffs2_clear_inode (struct inode *inode) | |||
233 | struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb); | 233 | struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb); |
234 | struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); | 234 | struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); |
235 | 235 | ||
236 | D1(printk(KERN_DEBUG "jffs2_clear_inode(): ino #%lu mode %o\n", inode->i_ino, inode->i_mode)); | 236 | D1(printk(KERN_DEBUG "jffs2_evict_inode(): ino #%lu mode %o\n", inode->i_ino, inode->i_mode)); |
237 | truncate_inode_pages(&inode->i_data, 0); | ||
238 | end_writeback(inode); | ||
237 | jffs2_do_clear_inode(c, f); | 239 | jffs2_do_clear_inode(c, f); |
238 | } | 240 | } |
239 | 241 | ||
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h index 4791aacf3084..00bae7cc2e48 100644 --- a/fs/jffs2/os-linux.h +++ b/fs/jffs2/os-linux.h | |||
@@ -171,7 +171,7 @@ extern const struct inode_operations jffs2_symlink_inode_operations; | |||
171 | int jffs2_setattr (struct dentry *, struct iattr *); | 171 | int jffs2_setattr (struct dentry *, struct iattr *); |
172 | int jffs2_do_setattr (struct inode *, struct iattr *); | 172 | int jffs2_do_setattr (struct inode *, struct iattr *); |
173 | struct inode *jffs2_iget(struct super_block *, unsigned long); | 173 | struct inode *jffs2_iget(struct super_block *, unsigned long); |
174 | void jffs2_clear_inode (struct inode *); | 174 | void jffs2_evict_inode (struct inode *); |
175 | void jffs2_dirty_inode(struct inode *inode); | 175 | void jffs2_dirty_inode(struct inode *inode); |
176 | struct inode *jffs2_new_inode (struct inode *dir_i, int mode, | 176 | struct inode *jffs2_new_inode (struct inode *dir_i, int mode, |
177 | struct jffs2_raw_inode *ri); | 177 | struct jffs2_raw_inode *ri); |
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 511e2d609d12..662bba099501 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c | |||
@@ -135,7 +135,7 @@ static const struct super_operations jffs2_super_operations = | |||
135 | .write_super = jffs2_write_super, | 135 | .write_super = jffs2_write_super, |
136 | .statfs = jffs2_statfs, | 136 | .statfs = jffs2_statfs, |
137 | .remount_fs = jffs2_remount_fs, | 137 | .remount_fs = jffs2_remount_fs, |
138 | .clear_inode = jffs2_clear_inode, | 138 | .evict_inode = jffs2_evict_inode, |
139 | .dirty_inode = jffs2_dirty_inode, | 139 | .dirty_inode = jffs2_dirty_inode, |
140 | .sync_fs = jffs2_sync_fs, | 140 | .sync_fs = jffs2_sync_fs, |
141 | }; | 141 | }; |
diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c index d258e261bdc7..9b572ca40a49 100644 --- a/fs/jffs2/xattr.c +++ b/fs/jffs2/xattr.c | |||
@@ -588,7 +588,7 @@ static void delete_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *re | |||
588 | 588 | ||
589 | void jffs2_xattr_delete_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic) | 589 | void jffs2_xattr_delete_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic) |
590 | { | 590 | { |
591 | /* It's called from jffs2_clear_inode() on inode removing. | 591 | /* It's called from jffs2_evict_inode() on inode removing. |
592 | When an inode with XATTR is removed, those XATTRs must be removed. */ | 592 | When an inode with XATTR is removed, those XATTRs must be removed. */ |
593 | struct jffs2_xattr_ref *ref, *_ref; | 593 | struct jffs2_xattr_ref *ref, *_ref; |
594 | 594 | ||
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 099b3518feea..c211b8168e5b 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -98,7 +98,7 @@ u64 nfs_compat_user_ino64(u64 fileid) | |||
98 | return ino; | 98 | return ino; |
99 | } | 99 | } |
100 | 100 | ||
101 | void nfs_clear_inode(struct inode *inode) | 101 | static void nfs_clear_inode(struct inode *inode) |
102 | { | 102 | { |
103 | /* | 103 | /* |
104 | * The following should never happen... | 104 | * The following should never happen... |
@@ -110,6 +110,13 @@ void nfs_clear_inode(struct inode *inode) | |||
110 | nfs_fscache_release_inode_cookie(inode); | 110 | nfs_fscache_release_inode_cookie(inode); |
111 | } | 111 | } |
112 | 112 | ||
113 | void nfs_evict_inode(struct inode *inode) | ||
114 | { | ||
115 | truncate_inode_pages(&inode->i_data, 0); | ||
116 | end_writeback(inode); | ||
117 | nfs_clear_inode(inode); | ||
118 | } | ||
119 | |||
113 | /** | 120 | /** |
114 | * nfs_sync_mapping - helper to flush all mmapped dirty data to disk | 121 | * nfs_sync_mapping - helper to flush all mmapped dirty data to disk |
115 | */ | 122 | */ |
@@ -1338,8 +1345,10 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
1338 | * to open() calls that passed nfs_atomic_lookup, but failed to call | 1345 | * to open() calls that passed nfs_atomic_lookup, but failed to call |
1339 | * nfs_open(). | 1346 | * nfs_open(). |
1340 | */ | 1347 | */ |
1341 | void nfs4_clear_inode(struct inode *inode) | 1348 | void nfs4_evict_inode(struct inode *inode) |
1342 | { | 1349 | { |
1350 | truncate_inode_pages(&inode->i_data, 0); | ||
1351 | end_writeback(inode); | ||
1343 | /* If we are holding a delegation, return it! */ | 1352 | /* If we are holding a delegation, return it! */ |
1344 | nfs_inode_return_delegation_noreclaim(inode); | 1353 | nfs_inode_return_delegation_noreclaim(inode); |
1345 | /* First call standard NFS clear_inode() code */ | 1354 | /* First call standard NFS clear_inode() code */ |
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index e70f44b9b3f4..f168ebdf7c6d 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h | |||
@@ -213,9 +213,9 @@ extern struct workqueue_struct *nfsiod_workqueue; | |||
213 | extern struct inode *nfs_alloc_inode(struct super_block *sb); | 213 | extern struct inode *nfs_alloc_inode(struct super_block *sb); |
214 | extern void nfs_destroy_inode(struct inode *); | 214 | extern void nfs_destroy_inode(struct inode *); |
215 | extern int nfs_write_inode(struct inode *, struct writeback_control *); | 215 | extern int nfs_write_inode(struct inode *, struct writeback_control *); |
216 | extern void nfs_clear_inode(struct inode *); | 216 | extern void nfs_evict_inode(struct inode *); |
217 | #ifdef CONFIG_NFS_V4 | 217 | #ifdef CONFIG_NFS_V4 |
218 | extern void nfs4_clear_inode(struct inode *); | 218 | extern void nfs4_evict_inode(struct inode *); |
219 | #endif | 219 | #endif |
220 | void nfs_zap_acl_cache(struct inode *inode); | 220 | void nfs_zap_acl_cache(struct inode *inode); |
221 | extern int nfs_wait_bit_killable(void *word); | 221 | extern int nfs_wait_bit_killable(void *word); |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index f9df16de4a56..ef2b7e468a7e 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -270,7 +270,7 @@ static const struct super_operations nfs_sops = { | |||
270 | .write_inode = nfs_write_inode, | 270 | .write_inode = nfs_write_inode, |
271 | .put_super = nfs_put_super, | 271 | .put_super = nfs_put_super, |
272 | .statfs = nfs_statfs, | 272 | .statfs = nfs_statfs, |
273 | .clear_inode = nfs_clear_inode, | 273 | .evict_inode = nfs_evict_inode, |
274 | .umount_begin = nfs_umount_begin, | 274 | .umount_begin = nfs_umount_begin, |
275 | .show_options = nfs_show_options, | 275 | .show_options = nfs_show_options, |
276 | .show_stats = nfs_show_stats, | 276 | .show_stats = nfs_show_stats, |
@@ -340,7 +340,7 @@ static const struct super_operations nfs4_sops = { | |||
340 | .write_inode = nfs_write_inode, | 340 | .write_inode = nfs_write_inode, |
341 | .put_super = nfs_put_super, | 341 | .put_super = nfs_put_super, |
342 | .statfs = nfs_statfs, | 342 | .statfs = nfs_statfs, |
343 | .clear_inode = nfs4_clear_inode, | 343 | .evict_inode = nfs4_evict_inode, |
344 | .umount_begin = nfs_umount_begin, | 344 | .umount_begin = nfs_umount_begin, |
345 | .show_options = nfs_show_options, | 345 | .show_options = nfs_show_options, |
346 | .show_stats = nfs_show_stats, | 346 | .show_stats = nfs_show_stats, |
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index fdef8f729c3a..93622b175fc7 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c | |||
@@ -2238,7 +2238,7 @@ void ntfs_clear_extent_inode(ntfs_inode *ni) | |||
2238 | } | 2238 | } |
2239 | 2239 | ||
2240 | /** | 2240 | /** |
2241 | * ntfs_clear_big_inode - clean up the ntfs specific part of an inode | 2241 | * ntfs_evict_big_inode - clean up the ntfs specific part of an inode |
2242 | * @vi: vfs inode pending annihilation | 2242 | * @vi: vfs inode pending annihilation |
2243 | * | 2243 | * |
2244 | * When the VFS is going to remove an inode from memory, ntfs_clear_big_inode() | 2244 | * When the VFS is going to remove an inode from memory, ntfs_clear_big_inode() |
@@ -2247,10 +2247,13 @@ void ntfs_clear_extent_inode(ntfs_inode *ni) | |||
2247 | * | 2247 | * |
2248 | * If the MFT record is dirty, we commit it before doing anything else. | 2248 | * If the MFT record is dirty, we commit it before doing anything else. |
2249 | */ | 2249 | */ |
2250 | void ntfs_clear_big_inode(struct inode *vi) | 2250 | void ntfs_evict_big_inode(struct inode *vi) |
2251 | { | 2251 | { |
2252 | ntfs_inode *ni = NTFS_I(vi); | 2252 | ntfs_inode *ni = NTFS_I(vi); |
2253 | 2253 | ||
2254 | truncate_inode_pages(&vi->i_data, 0); | ||
2255 | end_writeback(vi); | ||
2256 | |||
2254 | #ifdef NTFS_RW | 2257 | #ifdef NTFS_RW |
2255 | if (NInoDirty(ni)) { | 2258 | if (NInoDirty(ni)) { |
2256 | bool was_bad = (is_bad_inode(vi)); | 2259 | bool was_bad = (is_bad_inode(vi)); |
diff --git a/fs/ntfs/inode.h b/fs/ntfs/inode.h index 9a113544605d..2dabf813456c 100644 --- a/fs/ntfs/inode.h +++ b/fs/ntfs/inode.h | |||
@@ -279,7 +279,7 @@ extern struct inode *ntfs_index_iget(struct inode *base_vi, ntfschar *name, | |||
279 | 279 | ||
280 | extern struct inode *ntfs_alloc_big_inode(struct super_block *sb); | 280 | extern struct inode *ntfs_alloc_big_inode(struct super_block *sb); |
281 | extern void ntfs_destroy_big_inode(struct inode *inode); | 281 | extern void ntfs_destroy_big_inode(struct inode *inode); |
282 | extern void ntfs_clear_big_inode(struct inode *vi); | 282 | extern void ntfs_evict_big_inode(struct inode *vi); |
283 | 283 | ||
284 | extern void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni); | 284 | extern void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni); |
285 | 285 | ||
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 0de1db6cddbf..512806171bfa 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c | |||
@@ -2700,7 +2700,7 @@ static const struct super_operations ntfs_sops = { | |||
2700 | .put_super = ntfs_put_super, /* Syscall: umount. */ | 2700 | .put_super = ntfs_put_super, /* Syscall: umount. */ |
2701 | .statfs = ntfs_statfs, /* Syscall: statfs */ | 2701 | .statfs = ntfs_statfs, /* Syscall: statfs */ |
2702 | .remount_fs = ntfs_remount, /* Syscall: mount -o remount. */ | 2702 | .remount_fs = ntfs_remount, /* Syscall: mount -o remount. */ |
2703 | .clear_inode = ntfs_clear_big_inode, /* VFS: Called when an inode is | 2703 | .evict_inode = ntfs_evict_big_inode, /* VFS: Called when an inode is |
2704 | removed from memory. */ | 2704 | removed from memory. */ |
2705 | //.umount_begin = NULL, /* Forced umount. */ | 2705 | //.umount_begin = NULL, /* Forced umount. */ |
2706 | .show_options = ntfs_show_options, /* Show mount options in | 2706 | .show_options = ntfs_show_options, /* Show mount options in |
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index 85e4ccaedd1f..a43ebb11ad3b 100644 --- a/fs/ocfs2/dlmfs/dlmfs.c +++ b/fs/ocfs2/dlmfs/dlmfs.c | |||
@@ -357,13 +357,12 @@ static void dlmfs_destroy_inode(struct inode *inode) | |||
357 | kmem_cache_free(dlmfs_inode_cache, DLMFS_I(inode)); | 357 | kmem_cache_free(dlmfs_inode_cache, DLMFS_I(inode)); |
358 | } | 358 | } |
359 | 359 | ||
360 | static void dlmfs_clear_inode(struct inode *inode) | 360 | static void dlmfs_evict_inode(struct inode *inode) |
361 | { | 361 | { |
362 | int status; | 362 | int status; |
363 | struct dlmfs_inode_private *ip; | 363 | struct dlmfs_inode_private *ip; |
364 | 364 | ||
365 | if (!inode) | 365 | end_writeback(inode); |
366 | return; | ||
367 | 366 | ||
368 | mlog(0, "inode %lu\n", inode->i_ino); | 367 | mlog(0, "inode %lu\n", inode->i_ino); |
369 | 368 | ||
@@ -633,7 +632,7 @@ static const struct super_operations dlmfs_ops = { | |||
633 | .statfs = simple_statfs, | 632 | .statfs = simple_statfs, |
634 | .alloc_inode = dlmfs_alloc_inode, | 633 | .alloc_inode = dlmfs_alloc_inode, |
635 | .destroy_inode = dlmfs_destroy_inode, | 634 | .destroy_inode = dlmfs_destroy_inode, |
636 | .clear_inode = dlmfs_clear_inode, | 635 | .evict_inode = dlmfs_evict_inode, |
637 | .drop_inode = generic_delete_inode, | 636 | .drop_inode = generic_delete_inode, |
638 | }; | 637 | }; |
639 | 638 | ||
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 758df94690ed..15c35b62ff14 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -1100,13 +1100,15 @@ xfs_fs_write_inode( | |||
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | STATIC void | 1102 | STATIC void |
1103 | xfs_fs_clear_inode( | 1103 | xfs_fs_evict_inode( |
1104 | struct inode *inode) | 1104 | struct inode *inode) |
1105 | { | 1105 | { |
1106 | xfs_inode_t *ip = XFS_I(inode); | 1106 | xfs_inode_t *ip = XFS_I(inode); |
1107 | 1107 | ||
1108 | trace_xfs_clear_inode(ip); | 1108 | trace_xfs_evict_inode(ip); |
1109 | 1109 | ||
1110 | truncate_inode_pages(&inode->i_data, 0); | ||
1111 | end_writeback(inode); | ||
1110 | XFS_STATS_INC(vn_rele); | 1112 | XFS_STATS_INC(vn_rele); |
1111 | XFS_STATS_INC(vn_remove); | 1113 | XFS_STATS_INC(vn_remove); |
1112 | XFS_STATS_DEC(vn_active); | 1114 | XFS_STATS_DEC(vn_active); |
@@ -1622,7 +1624,7 @@ static const struct super_operations xfs_super_operations = { | |||
1622 | .destroy_inode = xfs_fs_destroy_inode, | 1624 | .destroy_inode = xfs_fs_destroy_inode, |
1623 | .dirty_inode = xfs_fs_dirty_inode, | 1625 | .dirty_inode = xfs_fs_dirty_inode, |
1624 | .write_inode = xfs_fs_write_inode, | 1626 | .write_inode = xfs_fs_write_inode, |
1625 | .clear_inode = xfs_fs_clear_inode, | 1627 | .evict_inode = xfs_fs_evict_inode, |
1626 | .put_super = xfs_fs_put_super, | 1628 | .put_super = xfs_fs_put_super, |
1627 | .sync_fs = xfs_fs_sync_fs, | 1629 | .sync_fs = xfs_fs_sync_fs, |
1628 | .freeze_fs = xfs_fs_freeze, | 1630 | .freeze_fs = xfs_fs_freeze, |
diff --git a/fs/xfs/linux-2.6/xfs_trace.h b/fs/xfs/linux-2.6/xfs_trace.h index c657cdca2cd2..be5dffd282a1 100644 --- a/fs/xfs/linux-2.6/xfs_trace.h +++ b/fs/xfs/linux-2.6/xfs_trace.h | |||
@@ -581,7 +581,7 @@ DEFINE_INODE_EVENT(xfs_ioctl_setattr); | |||
581 | DEFINE_INODE_EVENT(xfs_file_fsync); | 581 | DEFINE_INODE_EVENT(xfs_file_fsync); |
582 | DEFINE_INODE_EVENT(xfs_destroy_inode); | 582 | DEFINE_INODE_EVENT(xfs_destroy_inode); |
583 | DEFINE_INODE_EVENT(xfs_write_inode); | 583 | DEFINE_INODE_EVENT(xfs_write_inode); |
584 | DEFINE_INODE_EVENT(xfs_clear_inode); | 584 | DEFINE_INODE_EVENT(xfs_evict_inode); |
585 | 585 | ||
586 | DEFINE_INODE_EVENT(xfs_dquot_dqalloc); | 586 | DEFINE_INODE_EVENT(xfs_dquot_dqalloc); |
587 | DEFINE_INODE_EVENT(xfs_dquot_dqdetach); | 587 | DEFINE_INODE_EVENT(xfs_dquot_dqdetach); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 8553adbda57b..dec9ac598859 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1571,7 +1571,6 @@ struct super_operations { | |||
1571 | int (*unfreeze_fs) (struct super_block *); | 1571 | int (*unfreeze_fs) (struct super_block *); |
1572 | int (*statfs) (struct dentry *, struct kstatfs *); | 1572 | int (*statfs) (struct dentry *, struct kstatfs *); |
1573 | int (*remount_fs) (struct super_block *, int *, char *); | 1573 | int (*remount_fs) (struct super_block *, int *, char *); |
1574 | void (*clear_inode) (struct inode *); | ||
1575 | void (*umount_begin) (struct super_block *); | 1574 | void (*umount_begin) (struct super_block *); |
1576 | 1575 | ||
1577 | int (*show_options)(struct seq_file *, struct vfsmount *); | 1576 | int (*show_options)(struct seq_file *, struct vfsmount *); |
@@ -1616,7 +1615,7 @@ struct super_operations { | |||
1616 | * I_FREEING Set when inode is about to be freed but still has dirty | 1615 | * I_FREEING Set when inode is about to be freed but still has dirty |
1617 | * pages or buffers attached or the inode itself is still | 1616 | * pages or buffers attached or the inode itself is still |
1618 | * dirty. | 1617 | * dirty. |
1619 | * I_CLEAR Added by clear_inode(). In this state the inode is clean | 1618 | * I_CLEAR Added by end_writeback(). In this state the inode is clean |
1620 | * and can be destroyed. Inode keeps I_FREEING. | 1619 | * and can be destroyed. Inode keeps I_FREEING. |
1621 | * | 1620 | * |
1622 | * Inodes that are I_WILL_FREE, I_FREEING or I_CLEAR are | 1621 | * Inodes that are I_WILL_FREE, I_FREEING or I_CLEAR are |