You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
convert remaining ->clear_inode() to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
+3
-1
@@ -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
|
||||
|
||||
+2
-2
@@ -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,
|
||||
};
|
||||
|
||||
+4
-1
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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,
|
||||
};
|
||||
|
||||
+3
-2
@@ -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)
|
||||
|
||||
+5
-2
@@ -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,
|
||||
|
||||
+4
-2
@@ -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)
|
||||
|
||||
+5
-3
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
+5
-3
@@ -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
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
+4
-2
@@ -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,
|
||||
|
||||
+1
-1
@@ -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 */
|
||||
|
||||
+3
-1
@@ -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);
|
||||
|
||||
+1
-1
@@ -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,
|
||||
|
||||
+5
-3
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user