Skip to content

Commit b57922d

Browse files
author
Al Viro
committed
convert remaining ->clear_inode() to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 45321ac commit b57922d

34 files changed

Lines changed: 94 additions & 59 deletions

‎fs/9p/v9fs_vfs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void v9fs_destroy_inode(struct inode *inode);
5252
#endif
5353

5454
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);
5656
ino_t v9fs_qid2ino(struct p9_qid *qid);
5757
void v9fs_stat2inode(struct p9_wstat *, struct inode *, struct super_block *);
5858
int v9fs_dir_release(struct inode *inode, struct file *filp);

‎fs/9p/vfs_inode.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,10 @@ v9fs_clone_walk(struct v9fs_session_info *v9ses, u32 fid, struct dentry *dentry)
387387
* @inode: inode to release
388388
*
389389
*/
390-
void v9fs_clear_inode(struct inode *inode)
390+
void v9fs_evict_inode(struct inode *inode)
391391
{
392+
truncate_inode_pages(inode->i_mapping, 0);
393+
end_writeback(inode);
392394
filemap_fdatawrite(inode->i_mapping);
393395

394396
#ifdef CONFIG_9P_FSCACHE

‎fs/9p/vfs_super.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ static const struct super_operations v9fs_super_ops = {
257257
.destroy_inode = v9fs_destroy_inode,
258258
#endif
259259
.statfs = simple_statfs,
260-
.clear_inode = v9fs_clear_inode,
260+
.evict_inode = v9fs_evict_inode,
261261
.show_options = generic_show_options,
262262
.umount_begin = v9fs_umount_begin,
263263
};
@@ -268,7 +268,7 @@ static const struct super_operations v9fs_super_ops_dotl = {
268268
.destroy_inode = v9fs_destroy_inode,
269269
#endif
270270
.statfs = v9fs_statfs,
271-
.clear_inode = v9fs_clear_inode,
271+
.evict_inode = v9fs_evict_inode,
272272
.show_options = generic_show_options,
273273
.umount_begin = v9fs_umount_begin,
274274
};

‎fs/afs/inode.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ int afs_getattr(struct vfsmount *mnt, struct dentry *dentry,
316316
/*
317317
* clear an AFS inode
318318
*/
319-
void afs_clear_inode(struct inode *inode)
319+
void afs_evict_inode(struct inode *inode)
320320
{
321321
struct afs_permits *permits;
322322
struct afs_vnode *vnode;
@@ -335,6 +335,9 @@ void afs_clear_inode(struct inode *inode)
335335

336336
ASSERTCMP(inode->i_ino, ==, vnode->fid.vnode);
337337

338+
truncate_inode_pages(&inode->i_data, 0);
339+
end_writeback(inode);
340+
338341
afs_give_up_callback(vnode);
339342

340343
if (vnode->server) {

‎fs/afs/internal.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ extern void afs_zap_data(struct afs_vnode *);
565565
extern int afs_validate(struct afs_vnode *, struct key *);
566566
extern int afs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
567567
extern int afs_setattr(struct dentry *, struct iattr *);
568-
extern void afs_clear_inode(struct inode *);
568+
extern void afs_evict_inode(struct inode *);
569569

570570
/*
571571
* main.c

‎fs/afs/super.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static const struct super_operations afs_super_ops = {
4949
.statfs = afs_statfs,
5050
.alloc_inode = afs_alloc_inode,
5151
.destroy_inode = afs_destroy_inode,
52-
.clear_inode = afs_clear_inode,
52+
.evict_inode = afs_evict_inode,
5353
.put_super = afs_put_super,
5454
.show_options = generic_show_options,
5555
};

‎fs/binfmt_misc.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,9 @@ static struct inode *bm_get_inode(struct super_block *sb, int mode)
502502
return inode;
503503
}
504504

505-
static void bm_clear_inode(struct inode *inode)
505+
static void bm_evict_inode(struct inode *inode)
506506
{
507+
end_writeback(inode);
507508
kfree(inode->i_private);
508509
}
509510

@@ -685,7 +686,7 @@ static const struct file_operations bm_status_operations = {
685686

686687
static const struct super_operations s_ops = {
687688
.statfs = simple_statfs,
688-
.clear_inode = bm_clear_inode,
689+
.evict_inode = bm_evict_inode,
689690
};
690691

691692
static int bm_fill_super(struct super_block * sb, void * data, int silent)

‎fs/block_dev.c‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,13 @@ static inline void __bd_forget(struct inode *inode)
426426
inode->i_mapping = &inode->i_data;
427427
}
428428

429-
static void bdev_clear_inode(struct inode *inode)
429+
static void bdev_evict_inode(struct inode *inode)
430430
{
431431
struct block_device *bdev = &BDEV_I(inode)->bdev;
432432
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);
433436
spin_lock(&bdev_lock);
434437
while ( (p = bdev->bd_inodes.next) != &bdev->bd_inodes ) {
435438
__bd_forget(list_entry(p, struct inode, i_devices));
@@ -443,7 +446,7 @@ static const struct super_operations bdev_sops = {
443446
.alloc_inode = bdev_alloc_inode,
444447
.destroy_inode = bdev_destroy_inode,
445448
.drop_inode = generic_delete_inode,
446-
.clear_inode = bdev_clear_inode,
449+
.evict_inode = bdev_evict_inode,
447450
};
448451

449452
static int bd_get_sb(struct file_system_type *fs_type,

‎fs/cifs/cifsfs.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,10 @@ cifs_destroy_inode(struct inode *inode)
330330
}
331331

332332
static void
333-
cifs_clear_inode(struct inode *inode)
333+
cifs_evict_inode(struct inode *inode)
334334
{
335+
truncate_inode_pages(&inode->i_data, 0);
336+
end_writeback(inode);
335337
cifs_fscache_release_inode_cookie(inode);
336338
}
337339

@@ -495,7 +497,7 @@ static const struct super_operations cifs_super_ops = {
495497
.alloc_inode = cifs_alloc_inode,
496498
.destroy_inode = cifs_destroy_inode,
497499
.drop_inode = cifs_drop_inode,
498-
.clear_inode = cifs_clear_inode,
500+
.evict_inode = cifs_evict_inode,
499501
/* .delete_inode = cifs_delete_inode, */ /* Do not need above
500502
function unless later we add lazy close of inodes or unless the
501503
kernel forgets to call us with the same number of releases (closes)

‎fs/coda/inode.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "coda_int.h"
3636

3737
/* VFS super_block ops */
38-
static void coda_clear_inode(struct inode *);
38+
static void coda_evict_inode(struct inode *);
3939
static void coda_put_super(struct super_block *);
4040
static int coda_statfs(struct dentry *dentry, struct kstatfs *buf);
4141

@@ -93,7 +93,7 @@ static const struct super_operations coda_super_operations =
9393
{
9494
.alloc_inode = coda_alloc_inode,
9595
.destroy_inode = coda_destroy_inode,
96-
.clear_inode = coda_clear_inode,
96+
.evict_inode = coda_evict_inode,
9797
.put_super = coda_put_super,
9898
.statfs = coda_statfs,
9999
.remount_fs = coda_remount,
@@ -224,8 +224,10 @@ static void coda_put_super(struct super_block *sb)
224224
printk("Coda: Bye bye.\n");
225225
}
226226

227-
static void coda_clear_inode(struct inode *inode)
227+
static void coda_evict_inode(struct inode *inode)
228228
{
229+
truncate_inode_pages(&inode->i_data, 0);
230+
end_writeback(inode);
229231
coda_cache_clear_inode(inode);
230232
}
231233

0 commit comments

Comments
 (0)