]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
convert remaining ->clear_inode() to ->evict_inode()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 7 Jun 2010 18:34:48 +0000 (14:34 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 Aug 2010 20:48:37 +0000 (16:48 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
34 files changed:
fs/9p/v9fs_vfs.h
fs/9p/vfs_inode.c
fs/9p/vfs_super.c
fs/afs/inode.c
fs/afs/internal.h
fs/afs/super.c
fs/binfmt_misc.c
fs/block_dev.c
fs/cifs/cifsfs.c
fs/coda/inode.c
fs/ecryptfs/super.c
fs/freevxfs/vxfs_extern.h
fs/freevxfs/vxfs_inode.c
fs/freevxfs/vxfs_super.c
fs/fuse/inode.c
fs/hfs/hfs_fs.h
fs/hfs/inode.c
fs/hfs/super.c
fs/hfsplus/super.c
fs/inode.c
fs/jffs2/fs.c
fs/jffs2/os-linux.h
fs/jffs2/super.c
fs/jffs2/xattr.c
fs/nfs/inode.c
fs/nfs/internal.h
fs/nfs/super.c
fs/ntfs/inode.c
fs/ntfs/inode.h
fs/ntfs/super.c
fs/ocfs2/dlmfs/dlmfs.c
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/linux-2.6/xfs_trace.h
include/linux/fs.h

index 32ef4009d030063328d9811a9bcaf7daaf5e762d..3d056fe01b508ceb39864fcf14bebfb1b421dac1 100644 (file)
@@ -52,7 +52,7 @@ void v9fs_destroy_inode(struct inode *inode);
 #endif
 
 struct inode *v9fs_get_inode(struct super_block *sb, int mode);
-void v9fs_clear_inode(struct inode *inode);
+void v9fs_evict_inode(struct inode *inode);
 ino_t v9fs_qid2ino(struct p9_qid *qid);
 void v9fs_stat2inode(struct p9_wstat *, struct inode *, struct super_block *);
 int v9fs_dir_release(struct inode *inode, struct file *filp);
index 4b3ad6ac9a41d4a2c28ff0d0e9a7fb7c2f363867..b81ce206508d7c3c04b1cdd054e5d2472b61a71b 100644 (file)
@@ -387,8 +387,10 @@ error:
  * @inode: inode to release
  *
  */
-void v9fs_clear_inode(struct inode *inode)
+void v9fs_evict_inode(struct inode *inode)
 {
+       truncate_inode_pages(inode->i_mapping, 0);
+       end_writeback(inode);
        filemap_fdatawrite(inode->i_mapping);
 
 #ifdef CONFIG_9P_FSCACHE
index be74d020436e2d7badad70f6e89e430d12f9d6e8..c6122bf547df2c0b179f4ecb01aa486d2ac01a3c 100644 (file)
@@ -257,7 +257,7 @@ static const struct super_operations v9fs_super_ops = {
        .destroy_inode = v9fs_destroy_inode,
 #endif
        .statfs = simple_statfs,
-       .clear_inode = v9fs_clear_inode,
+       .evict_inode = v9fs_evict_inode,
        .show_options = generic_show_options,
        .umount_begin = v9fs_umount_begin,
 };
@@ -268,7 +268,7 @@ static const struct super_operations v9fs_super_ops_dotl = {
        .destroy_inode = v9fs_destroy_inode,
 #endif
        .statfs = v9fs_statfs,
-       .clear_inode = v9fs_clear_inode,
+       .evict_inode = v9fs_evict_inode,
        .show_options = generic_show_options,
        .umount_begin = v9fs_umount_begin,
 };
index d00b312e31108c8a4477e168f445982cd5e30743..320ffef115746362defa94edef14b3a083df64ae 100644 (file)
@@ -316,7 +316,7 @@ int afs_getattr(struct vfsmount *mnt, struct dentry *dentry,
 /*
  * clear an AFS inode
  */
-void afs_clear_inode(struct inode *inode)
+void afs_evict_inode(struct inode *inode)
 {
        struct afs_permits *permits;
        struct afs_vnode *vnode;
@@ -335,6 +335,9 @@ void afs_clear_inode(struct inode *inode)
 
        ASSERTCMP(inode->i_ino, ==, vnode->fid.vnode);
 
+       truncate_inode_pages(&inode->i_data, 0);
+       end_writeback(inode);
+
        afs_give_up_callback(vnode);
 
        if (vnode->server) {
index 5f679b77ce24cf581cfab842236ae4e5ed391475..8679089ce9a1300b1bd8f11be30c73e073b65225 100644 (file)
@@ -565,7 +565,7 @@ extern void afs_zap_data(struct afs_vnode *);
 extern int afs_validate(struct afs_vnode *, struct key *);
 extern int afs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
 extern int afs_setattr(struct dentry *, struct iattr *);
-extern void afs_clear_inode(struct inode *);
+extern void afs_evict_inode(struct inode *);
 
 /*
  * main.c
index e932e5a3a0c1f6d5628f4e54fb6611515e0d18eb..9cf80f02da16a119747eb314ace489e50b1aaabf 100644 (file)
@@ -49,7 +49,7 @@ static const struct super_operations afs_super_ops = {
        .statfs         = afs_statfs,
        .alloc_inode    = afs_alloc_inode,
        .destroy_inode  = afs_destroy_inode,
-       .clear_inode    = afs_clear_inode,
+       .evict_inode    = afs_evict_inode,
        .put_super      = afs_put_super,
        .show_options   = generic_show_options,
 };
index c4e83537ead77501f03d7fcb3a748727f2624d5e..9e60fd201716020c8506a392ecf76204b3884cb1 100644 (file)
@@ -502,8 +502,9 @@ static struct inode *bm_get_inode(struct super_block *sb, int mode)
        return inode;
 }
 
-static void bm_clear_inode(struct inode *inode)
+static void bm_evict_inode(struct inode *inode)
 {
+       end_writeback(inode);
        kfree(inode->i_private);
 }
 
@@ -685,7 +686,7 @@ static const struct file_operations bm_status_operations = {
 
 static const struct super_operations s_ops = {
        .statfs         = simple_statfs,
-       .clear_inode    = bm_clear_inode,
+       .evict_inode    = bm_evict_inode,
 };
 
 static int bm_fill_super(struct super_block * sb, void * data, int silent)
index 63c9d60762051de9c5c91bcc7f00d81bc7172c87..de7b4d0c7e30840e011a816217ebf58bf065346a 100644 (file)
@@ -426,10 +426,13 @@ static inline void __bd_forget(struct inode *inode)
        inode->i_mapping = &inode->i_data;
 }
 
-static void bdev_clear_inode(struct inode *inode)
+static void bdev_evict_inode(struct inode *inode)
 {
        struct block_device *bdev = &BDEV_I(inode)->bdev;
        struct list_head *p;
+       truncate_inode_pages(&inode->i_data, 0);
+       invalidate_inode_buffers(inode); /* is it needed here? */
+       end_writeback(inode);
        spin_lock(&bdev_lock);
        while ( (p = bdev->bd_inodes.next) != &bdev->bd_inodes ) {
                __bd_forget(list_entry(p, struct inode, i_devices));
@@ -443,7 +446,7 @@ static const struct super_operations bdev_sops = {
        .alloc_inode = bdev_alloc_inode,
        .destroy_inode = bdev_destroy_inode,
        .drop_inode = generic_delete_inode,
-       .clear_inode = bdev_clear_inode,
+       .evict_inode = bdev_evict_inode,
 };
 
 static int bd_get_sb(struct file_system_type *fs_type,
index 20914f5627ddfb2a9a4142a54e0972f9834aa092..5574a42b7bb6b6eed9abafb00a27277db79f737d 100644 (file)
@@ -330,8 +330,10 @@ cifs_destroy_inode(struct inode *inode)
 }
 
 static void
-cifs_clear_inode(struct inode *inode)
+cifs_evict_inode(struct inode *inode)
 {
+       truncate_inode_pages(&inode->i_data, 0);
+       end_writeback(inode);
        cifs_fscache_release_inode_cookie(inode);
 }
 
@@ -495,7 +497,7 @@ static const struct super_operations cifs_super_ops = {
        .alloc_inode = cifs_alloc_inode,
        .destroy_inode = cifs_destroy_inode,
        .drop_inode     = cifs_drop_inode,
-       .clear_inode    = cifs_clear_inode,
+       .evict_inode    = cifs_evict_inode,
 /*     .delete_inode   = cifs_delete_inode,  */  /* Do not need above
        function unless later we add lazy close of inodes or unless the
        kernel forgets to call us with the same number of releases (closes)
index d97f9935a0285ea150f885cb7609b65b4eccc41f..6526e6f21ecfb22f23a5b19efb5b9d82287cef49 100644 (file)
@@ -35,7 +35,7 @@
 #include "coda_int.h"
 
 /* VFS super_block ops */
-static void coda_clear_inode(struct inode *);
+static void coda_evict_inode(struct inode *);
 static void coda_put_super(struct super_block *);
 static int coda_statfs(struct dentry *dentry, struct kstatfs *buf);
 
@@ -93,7 +93,7 @@ static const struct super_operations coda_super_operations =
 {
        .alloc_inode    = coda_alloc_inode,
        .destroy_inode  = coda_destroy_inode,
-       .clear_inode    = coda_clear_inode,
+       .evict_inode    = coda_evict_inode,
        .put_super      = coda_put_super,
        .statfs         = coda_statfs,
        .remount_fs     = coda_remount,
@@ -224,8 +224,10 @@ static void coda_put_super(struct super_block *sb)
        printk("Coda: Bye bye.\n");
 }
 
-static void coda_clear_inode(struct inode *inode)
+static void coda_evict_inode(struct inode *inode)
 {
+       truncate_inode_pages(&inode->i_data, 0);
+       end_writeback(inode);
        coda_cache_clear_inode(inode);
 }
 
index 0435886e4a9f4afd49308ea7040db9b7d9ed52a3..4b5de6c6e0fa0a656e6a78d1500f348b1e2fc056 100644 (file)
@@ -122,7 +122,7 @@ static int ecryptfs_statfs(struct dentry *dentry, struct kstatfs *buf)
 }
 
 /**
- * ecryptfs_clear_inode
+ * ecryptfs_evict_inode
  * @inode - The ecryptfs inode
  *
  * Called by iput() when the inode reference count reached zero
@@ -131,8 +131,10 @@ static int ecryptfs_statfs(struct dentry *dentry, struct kstatfs *buf)
  * on the inode free list. We use this to drop out reference to the
  * lower inode.
  */
-static void ecryptfs_clear_inode(struct inode *inode)
+static void ecryptfs_evict_inode(struct inode *inode)
 {
+       truncate_inode_pages(&inode->i_data, 0);
+       end_writeback(inode);
        iput(ecryptfs_inode_to_lower(inode));
 }
 
@@ -184,6 +186,6 @@ const struct super_operations ecryptfs_sops = {
        .drop_inode = generic_delete_inode,
        .statfs = ecryptfs_statfs,
        .remount_fs = NULL,
-       .clear_inode = ecryptfs_clear_inode,
+       .evict_inode = ecryptfs_evict_inode,
        .show_options = ecryptfs_show_options
 };
index 50ab5eecb99b845d5c88b81e83fdfeaa0eafaa2e..881aa3d217f007a76361ff1c23f77499bdab851e 100644 (file)
@@ -63,7 +63,7 @@ extern void                   vxfs_put_fake_inode(struct inode *);
 extern struct vxfs_inode_info *        vxfs_blkiget(struct super_block *, u_long, ino_t);
 extern struct vxfs_inode_info *        vxfs_stiget(struct super_block *, ino_t);
 extern struct inode *          vxfs_iget(struct super_block *, ino_t);
-extern void                    vxfs_clear_inode(struct inode *);
+extern void                    vxfs_evict_inode(struct inode *);
 
 /* vxfs_lookup.c */
 extern const struct inode_operations   vxfs_dir_inode_ops;
index 03a6ea5e99f776c062b1daad14cffbb7d87cde4b..79d1b4ea13e79bc6531761ed817f0011653492bd 100644 (file)
@@ -337,15 +337,17 @@ vxfs_iget(struct super_block *sbp, ino_t ino)
 }
 
 /**
- * vxfs_clear_inode - remove inode from main memory
+ * vxfs_evict_inode - remove inode from main memory
  * @ip:                inode to discard.
  *
  * Description:
- *  vxfs_clear_inode() is called on the final iput and frees the private
+ *  vxfs_evict_inode() is called on the final iput and frees the private
  *  inode area.
  */
 void
-vxfs_clear_inode(struct inode *ip)
+vxfs_evict_inode(struct inode *ip)
 {
+       truncate_inode_pages(&ip->i_data, 0);
+       end_writeback(ip);
        kmem_cache_free(vxfs_inode_cachep, ip->i_private);
 }
index 1e8af939b3e4ad58d41726db3851269193a2e0c9..1f3ffd93b3579ac52966010c536d06523547ebe7 100644 (file)
@@ -61,7 +61,7 @@ static int            vxfs_statfs(struct dentry *, struct kstatfs *);
 static int             vxfs_remount(struct super_block *, int *, char *);
 
 static const struct super_operations vxfs_super_ops = {
-       .clear_inode =          vxfs_clear_inode,
+       .evict_inode =          vxfs_evict_inode,
        .put_super =            vxfs_put_super,
        .statfs =               vxfs_statfs,
        .remount_fs =           vxfs_remount,
index ec14d19ce5016d6f53874c2735221e8fcd1537db..da9e6e11374c402d63145dd2da7b0e8fdf72deca 100644 (file)
@@ -122,8 +122,10 @@ void fuse_send_forget(struct fuse_conn *fc, struct fuse_req *req,
        fuse_request_send_noreply(fc, req);
 }
 
-static void fuse_clear_inode(struct inode *inode)
+static void fuse_evict_inode(struct inode *inode)
 {
+       truncate_inode_pages(&inode->i_data, 0);
+       end_writeback(inode);
        if (inode->i_sb->s_flags & MS_ACTIVE) {
                struct fuse_conn *fc = get_fuse_conn(inode);
                struct fuse_inode *fi = get_fuse_inode(inode);
@@ -736,7 +738,7 @@ static const struct export_operations fuse_export_operations = {
 static const struct super_operations fuse_super_operations = {
        .alloc_inode    = fuse_alloc_inode,
        .destroy_inode  = fuse_destroy_inode,
-       .clear_inode    = fuse_clear_inode,
+       .evict_inode    = fuse_evict_inode,
        .drop_inode     = generic_delete_inode,
        .remount_fs     = fuse_remount_fs,
        .put_super      = fuse_put_super,
index fe35e3b626c4b102bec8acb0ec8a33d0e1f288ae..4f55651aaa51e888e6c6dbcb19b78384e20caa61 100644 (file)
@@ -193,7 +193,7 @@ extern int hfs_inode_setattr(struct dentry *, struct iattr *);
 extern void hfs_inode_read_fork(struct inode *inode, struct hfs_extent *ext,
                        __be32 log_size, __be32 phys_size, u32 clump_size);
 extern struct inode *hfs_iget(struct super_block *, struct hfs_cat_key *, hfs_cat_rec *);
-extern void hfs_clear_inode(struct inode *);
+extern void hfs_evict_inode(struct inode *);
 extern void hfs_delete_inode(struct inode *);
 
 /* attr.c */
index 93ceec8fbb8f0d20665b8b0e1a73b5675a8588c2..397b7adc7ce668dd2880fa73b4f5ee6cf1b050a2 100644 (file)
@@ -531,8 +531,10 @@ out:
        return NULL;
 }
 
-void hfs_clear_inode(struct inode *inode)
+void hfs_evict_inode(struct inode *inode)
 {
+       truncate_inode_pages(&inode->i_data, 0);
+       end_writeback(inode);
        if (HFS_IS_RSRC(inode) && HFS_I(inode)->rsrc_inode) {
                HFS_I(HFS_I(inode)->rsrc_inode)->rsrc_inode = NULL;
                iput(HFS_I(inode)->rsrc_inode);
index 0a81eb7111f3505600b626e1c88145692aa8c725..34235d4bf08bb5921768b1105b37bfff4277cd7a 100644 (file)
@@ -181,7 +181,7 @@ static const struct super_operations hfs_super_operations = {
        .alloc_inode    = hfs_alloc_inode,
        .destroy_inode  = hfs_destroy_inode,
        .write_inode    = hfs_write_inode,
-       .clear_inode    = hfs_clear_inode,
+       .evict_inode    = hfs_evict_inode,
        .put_super      = hfs_put_super,
        .write_super    = hfs_write_super,
        .sync_fs        = hfs_sync_fs,
index a32c241e4e456f1b3c8559fcc330a01ba403c72e..3b55c050c74274710fa95cad827edf6abd6b8316 100644 (file)
@@ -145,9 +145,11 @@ static int hfsplus_write_inode(struct inode *inode,
        return ret;
 }
 
-static void hfsplus_clear_inode(struct inode *inode)
+static void hfsplus_evict_inode(struct inode *inode)
 {
-       dprint(DBG_INODE, "hfsplus_clear_inode: %lu\n", inode->i_ino);
+       dprint(DBG_INODE, "hfsplus_evict_inode: %lu\n", inode->i_ino);
+       truncate_inode_pages(&inode->i_data, 0);
+       end_writeback(inode);
        if (HFSPLUS_IS_RSRC(inode)) {
                HFSPLUS_I(HFSPLUS_I(inode).rsrc_inode).rsrc_inode = NULL;
                iput(HFSPLUS_I(inode).rsrc_inode);
@@ -293,7 +295,7 @@ static const struct super_operations hfsplus_sops = {
        .alloc_inode    = hfsplus_alloc_inode,
        .destroy_inode  = hfsplus_destroy_inode,
        .write_inode    = hfsplus_write_inode,
-       .clear_inode    = hfsplus_clear_inode,
+       .evict_inode    = hfsplus_evict_inode,
        .put_super      = hfsplus_put_super,
        .write_super    = hfsplus_write_super,
        .sync_fs        = hfsplus_sync_fs,
index 0e077619cbf683d77c2a77f649a49dd15273a3c9..5daeb0b8fb596f95d066d82599c31410487b4906 100644 (file)
@@ -317,8 +317,6 @@ static void evict(struct inode *inode)
                        truncate_inode_pages(&inode->i_data, 0);
                invalidate_inode_buffers(inode);
                end_writeback(inode);
-               if (op->clear_inode)
-                       op->clear_inode(inode);
        }
        if (S_ISBLK(inode->i_mode) && inode->i_bdev)
                bd_forget(inode);
index 1b2426604fe3c15bca73416fadea60a713ad2db0..ac0638f049698e1b227c559f0c203ee2497a59cd 100644 (file)
@@ -225,7 +225,7 @@ int jffs2_statfs(struct dentry *dentry, struct kstatfs *buf)
 }
 
 
-void jffs2_clear_inode (struct inode *inode)
+void jffs2_evict_inode (struct inode *inode)
 {
        /* We can forget about this inode for now - drop all
         *  the nodelists associated with it, etc.
@@ -233,7 +233,9 @@ void jffs2_clear_inode (struct inode *inode)
        struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
        struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
 
-       D1(printk(KERN_DEBUG "jffs2_clear_inode(): ino #%lu mode %o\n", inode->i_ino, inode->i_mode));
+       D1(printk(KERN_DEBUG "jffs2_evict_inode(): ino #%lu mode %o\n", inode->i_ino, inode->i_mode));
+       truncate_inode_pages(&inode->i_data, 0);
+       end_writeback(inode);
        jffs2_do_clear_inode(c, f);
 }
 
index 4791aacf30849d93ef8ff6875b0c41c651d3c204..00bae7cc2e48eba4029f0b58d92e2113e057c5a6 100644 (file)
@@ -171,7 +171,7 @@ extern const struct inode_operations jffs2_symlink_inode_operations;
 int jffs2_setattr (struct dentry *, struct iattr *);
 int jffs2_do_setattr (struct inode *, struct iattr *);
 struct inode *jffs2_iget(struct super_block *, unsigned long);
-void jffs2_clear_inode (struct inode *);
+void jffs2_evict_inode (struct inode *);
 void jffs2_dirty_inode(struct inode *inode);
 struct inode *jffs2_new_inode (struct inode *dir_i, int mode,
                               struct jffs2_raw_inode *ri);
index 511e2d609d129f6171bf18bdbe5c9c8c09123d12..662bba099501277caff6bd0b0c54abe1aaddf8cf 100644 (file)
@@ -135,7 +135,7 @@ static const struct super_operations jffs2_super_operations =
        .write_super =  jffs2_write_super,
        .statfs =       jffs2_statfs,
        .remount_fs =   jffs2_remount_fs,
-       .clear_inode =  jffs2_clear_inode,
+       .evict_inode =  jffs2_evict_inode,
        .dirty_inode =  jffs2_dirty_inode,
        .sync_fs =      jffs2_sync_fs,
 };
index d258e261bdc76662b9620e8a14811aaf01b4306b..9b572ca40a49284ef9e4dccd8c1ce24247256b68 100644 (file)
@@ -588,7 +588,7 @@ static void delete_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *re
 
 void jffs2_xattr_delete_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic)
 {
-       /* It's called from jffs2_clear_inode() on inode removing.
+       /* It's called from jffs2_evict_inode() on inode removing.
           When an inode with XATTR is removed, those XATTRs must be removed. */
        struct jffs2_xattr_ref *ref, *_ref;
 
index 099b3518feea6409861c55e7ca7a5fbe421c0125..c211b8168e5bfe2b86ac2a6adff2ee611a709c9f 100644 (file)
@@ -98,7 +98,7 @@ u64 nfs_compat_user_ino64(u64 fileid)
        return ino;
 }
 
-void nfs_clear_inode(struct inode *inode)
+static void nfs_clear_inode(struct inode *inode)
 {
        /*
         * The following should never happen...
@@ -110,6 +110,13 @@ void nfs_clear_inode(struct inode *inode)
        nfs_fscache_release_inode_cookie(inode);
 }
 
+void nfs_evict_inode(struct inode *inode)
+{
+       truncate_inode_pages(&inode->i_data, 0);
+       end_writeback(inode);
+       nfs_clear_inode(inode);
+}
+
 /**
  * nfs_sync_mapping - helper to flush all mmapped dirty data to disk
  */
@@ -1338,8 +1345,10 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
  * to open() calls that passed nfs_atomic_lookup, but failed to call
  * nfs_open().
  */
-void nfs4_clear_inode(struct inode *inode)
+void nfs4_evict_inode(struct inode *inode)
 {
+       truncate_inode_pages(&inode->i_data, 0);
+       end_writeback(inode);
        /* If we are holding a delegation, return it! */
        nfs_inode_return_delegation_noreclaim(inode);
        /* First call standard NFS clear_inode() code */
index e70f44b9b3f43ff5a837435e886fd73f2372a20c..f168ebdf7c6d7de615340a181f94f785f8290558 100644 (file)
@@ -213,9 +213,9 @@ extern struct workqueue_struct *nfsiod_workqueue;
 extern struct inode *nfs_alloc_inode(struct super_block *sb);
 extern void nfs_destroy_inode(struct inode *);
 extern int nfs_write_inode(struct inode *, struct writeback_control *);
-extern void nfs_clear_inode(struct inode *);
+extern void nfs_evict_inode(struct inode *);
 #ifdef CONFIG_NFS_V4
-extern void nfs4_clear_inode(struct inode *);
+extern void nfs4_evict_inode(struct inode *);
 #endif
 void nfs_zap_acl_cache(struct inode *inode);
 extern int nfs_wait_bit_killable(void *word);
index f9df16de4a56b84e18ddb3288f9606bd2cd2cd49..ef2b7e468a7e0e6070b69637992bfe757a27cf1b 100644 (file)
@@ -270,7 +270,7 @@ static const struct super_operations nfs_sops = {
        .write_inode    = nfs_write_inode,
        .put_super      = nfs_put_super,
        .statfs         = nfs_statfs,
-       .clear_inode    = nfs_clear_inode,
+       .evict_inode    = nfs_evict_inode,
        .umount_begin   = nfs_umount_begin,
        .show_options   = nfs_show_options,
        .show_stats     = nfs_show_stats,
@@ -340,7 +340,7 @@ static const struct super_operations nfs4_sops = {
        .write_inode    = nfs_write_inode,
        .put_super      = nfs_put_super,
        .statfs         = nfs_statfs,
-       .clear_inode    = nfs4_clear_inode,
+       .evict_inode    = nfs4_evict_inode,
        .umount_begin   = nfs_umount_begin,
        .show_options   = nfs_show_options,
        .show_stats     = nfs_show_stats,
index fdef8f729c3ada2b0ee514986820d84ddd6ffab6..93622b175fc7f6f10f8cd744c8ebdba65401b1ea 100644 (file)
@@ -2238,7 +2238,7 @@ void ntfs_clear_extent_inode(ntfs_inode *ni)
 }
 
 /**
- * ntfs_clear_big_inode - clean up the ntfs specific part of an inode
+ * ntfs_evict_big_inode - clean up the ntfs specific part of an inode
  * @vi:                vfs inode pending annihilation
  *
  * 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)
  *
  * If the MFT record is dirty, we commit it before doing anything else.
  */
-void ntfs_clear_big_inode(struct inode *vi)
+void ntfs_evict_big_inode(struct inode *vi)
 {
        ntfs_inode *ni = NTFS_I(vi);
 
+       truncate_inode_pages(&vi->i_data, 0);
+       end_writeback(vi);
+
 #ifdef NTFS_RW
        if (NInoDirty(ni)) {
                bool was_bad = (is_bad_inode(vi));
index 9a113544605d5e69d3df07f1b55eea8b1a86cfde..2dabf813456ca757dbec43386f2320d907600baa 100644 (file)
@@ -279,7 +279,7 @@ extern struct inode *ntfs_index_iget(struct inode *base_vi, ntfschar *name,
 
 extern struct inode *ntfs_alloc_big_inode(struct super_block *sb);
 extern void ntfs_destroy_big_inode(struct inode *inode);
-extern void ntfs_clear_big_inode(struct inode *vi);
+extern void ntfs_evict_big_inode(struct inode *vi);
 
 extern void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni);
 
index 0de1db6cddbfee225bde0314669fbcde82cc70c2..512806171bfa2e2dfb73975feb60ea9560a654a7 100644 (file)
@@ -2700,7 +2700,7 @@ static const struct super_operations ntfs_sops = {
        .put_super      = ntfs_put_super,       /* Syscall: umount. */
        .statfs         = ntfs_statfs,          /* Syscall: statfs */
        .remount_fs     = ntfs_remount,         /* Syscall: mount -o remount. */
-       .clear_inode    = ntfs_clear_big_inode, /* VFS: Called when an inode is
+       .evict_inode    = ntfs_evict_big_inode, /* VFS: Called when an inode is
                                                   removed from memory. */
        //.umount_begin = NULL,                 /* Forced umount. */
        .show_options   = ntfs_show_options,    /* Show mount options in
index 85e4ccaedd1f3615dd44f650238cc8a9603d342a..a43ebb11ad3b9eecb0986891229f51c8299a3913 100644 (file)
@@ -357,13 +357,12 @@ static void dlmfs_destroy_inode(struct inode *inode)
        kmem_cache_free(dlmfs_inode_cache, DLMFS_I(inode));
 }
 
-static void dlmfs_clear_inode(struct inode *inode)
+static void dlmfs_evict_inode(struct inode *inode)
 {
        int status;
        struct dlmfs_inode_private *ip;
 
-       if (!inode)
-               return;
+       end_writeback(inode);
 
        mlog(0, "inode %lu\n", inode->i_ino);
 
@@ -633,7 +632,7 @@ static const struct super_operations dlmfs_ops = {
        .statfs         = simple_statfs,
        .alloc_inode    = dlmfs_alloc_inode,
        .destroy_inode  = dlmfs_destroy_inode,
-       .clear_inode    = dlmfs_clear_inode,
+       .evict_inode    = dlmfs_evict_inode,
        .drop_inode     = generic_delete_inode,
 };
 
index 758df94690edc7ab8663933b289b6c17e82d7289..15c35b62ff14ba46e0dd31d09cb5b0dfb54cf195 100644 (file)
@@ -1100,13 +1100,15 @@ xfs_fs_write_inode(
 }
 
 STATIC void
-xfs_fs_clear_inode(
+xfs_fs_evict_inode(
        struct inode            *inode)
 {
        xfs_inode_t             *ip = XFS_I(inode);
 
-       trace_xfs_clear_inode(ip);
+       trace_xfs_evict_inode(ip);
 
+       truncate_inode_pages(&inode->i_data, 0);
+       end_writeback(inode);
        XFS_STATS_INC(vn_rele);
        XFS_STATS_INC(vn_remove);
        XFS_STATS_DEC(vn_active);
@@ -1622,7 +1624,7 @@ static const struct super_operations xfs_super_operations = {
        .destroy_inode          = xfs_fs_destroy_inode,
        .dirty_inode            = xfs_fs_dirty_inode,
        .write_inode            = xfs_fs_write_inode,
-       .clear_inode            = xfs_fs_clear_inode,
+       .evict_inode            = xfs_fs_evict_inode,
        .put_super              = xfs_fs_put_super,
        .sync_fs                = xfs_fs_sync_fs,
        .freeze_fs              = xfs_fs_freeze,
index c657cdca2cd2648ac173332556bc371ffb577847..be5dffd282a10095e146e95206d24f10e6baffdf 100644 (file)
@@ -581,7 +581,7 @@ DEFINE_INODE_EVENT(xfs_ioctl_setattr);
 DEFINE_INODE_EVENT(xfs_file_fsync);
 DEFINE_INODE_EVENT(xfs_destroy_inode);
 DEFINE_INODE_EVENT(xfs_write_inode);
-DEFINE_INODE_EVENT(xfs_clear_inode);
+DEFINE_INODE_EVENT(xfs_evict_inode);
 
 DEFINE_INODE_EVENT(xfs_dquot_dqalloc);
 DEFINE_INODE_EVENT(xfs_dquot_dqdetach);
index 8553adbda57b190b1309a4602c42502729434fb7..dec9ac59885904dbe498dca9b1452165b3cda2f7 100644 (file)
@@ -1571,7 +1571,6 @@ struct super_operations {
        int (*unfreeze_fs) (struct super_block *);
        int (*statfs) (struct dentry *, struct kstatfs *);
        int (*remount_fs) (struct super_block *, int *, char *);
-       void (*clear_inode) (struct inode *);
        void (*umount_begin) (struct super_block *);
 
        int (*show_options)(struct seq_file *, struct vfsmount *);
@@ -1616,7 +1615,7 @@ struct super_operations {
  * I_FREEING           Set when inode is about to be freed but still has dirty
  *                     pages or buffers attached or the inode itself is still
  *                     dirty.
- * I_CLEAR             Added by clear_inode().  In this state the inode is clean
+ * I_CLEAR             Added by end_writeback().  In this state the inode is clean
  *                     and can be destroyed.  Inode keeps I_FREEING.
  *
  *                     Inodes that are I_WILL_FREE, I_FREEING or I_CLEAR are