fs: rename generic_delete_inode() and generic_drop_inode()
Subsystems (31)
PATCH 1/1 fs: rename generic_delete_inode() and generic_drop_inode()
generic_delete_inode() is rather misleading for what the routine is doing. inode_just_drop() should be much clearer.
The new naming is inconsistent with generic_drop_inode(), so rename that one as well with inode_ as the suffix.
No functional changes.
---
Generated on top of master with:
git grep --files-with-matches -E '(generic_delete_inode|generic_drop_inode)' | xargs sed -i 's/generic_delete_inode/inode_just_drop/; s/generic_drop_inode/inode_generic_drop/'
[is there a handier way?]
I'm not going to argue for the names and I'm not going to protest if someone else submits their own sedpatch.
Documentation/filesystems/porting.rst | 4 ++-- Documentation/filesystems/vfs.rst | 4 ++-- block/bdev.c | 2 +- drivers/dax/super.c | 2 +- drivers/misc/ibmasm/ibmasmfs.c | 2 +- drivers/usb/gadget/function/f_fs.c | 2 +- drivers/usb/gadget/legacy/inode.c | 2 +- fs/9p/vfs_super.c | 2 +- fs/afs/inode.c | 4 ++-- fs/btrfs/inode.c | 2 +- fs/ceph/super.c | 2 +- fs/configfs/mount.c | 2 +- fs/efivarfs/super.c | 2 +- fs/ext4/super.c | 2 +- fs/f2fs/super.c | 2 +- fs/fuse/inode.c | 2 +- fs/gfs2/super.c | 2 +- fs/hostfs/hostfs_kern.c | 2 +- fs/inode.c | 6 +++--- fs/kernfs/mount.c | 2 +- fs/nfs/inode.c | 2 +- fs/ocfs2/dlmfs/dlmfs.c | 2 +- fs/orangefs/super.c | 2 +- fs/overlayfs/super.c | 2 +- fs/pidfs.c | 2 +- fs/proc/inode.c | 2 +- fs/pstore/inode.c | 2 +- fs/ramfs/inode.c | 2 +- fs/smb/client/cifsfs.c | 2 +- fs/ubifs/super.c | 2 +- fs/xfs/xfs_super.c | 2 +- include/linux/fs.h | 4 ++-- kernel/bpf/inode.c | 2 +- mm/shmem.c | 2 +- 34 files changed, 40 insertions(+), 40 deletions(-)
Documentation/filesystems/porting.rst +2 -2
@@ -340,8 +340,8 @@ of those. Caller makes sure async writeback cannot be running for the inode whil ->drop_inode() returns int now; it's called on final iput() with inode->i_lock held and it returns true if filesystems wants the inode to be -dropped. As before, generic_drop_inode() is still the default and it's been -updated appropriately. generic_delete_inode() is also alive and it consists +dropped. As before, inode_generic_drop() is still the default and it's been +updated appropriately. inode_just_drop() is also alive and it consists simply of return 1. Note that all actual eviction work is done by caller after ->drop_inode() returns.
Documentation/filesystems/vfs.rst +2 -2
@@ -327,11 +327,11 @@ or bottom half). inode->i_lock spinlock held. This method should be either NULL (normal UNIX filesystem - semantics) or "generic_delete_inode" (for filesystems that do + semantics) or "inode_just_drop" (for filesystems that do not want to cache inodes - causing "delete_inode" to always be called regardless of the value of i_nlink) - The "generic_delete_inode()" behavior is equivalent to the old + The "inode_just_drop()" behavior is equivalent to the old practice of using "force_delete" in the put_inode() case, but does not have the races that the "force_delete()" approach had.
block/bdev.c +1 -1
@@ -412,7 +412,7 @@ static const struct super_operations bdev_sops = { .statfs = simple_statfs, .alloc_inode = bdev_alloc_inode, .free_inode = bdev_free_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = bdev_evict_inode, };
drivers/dax/super.c +1 -1
@@ -388,7 +388,7 @@ static const struct super_operations dax_sops = { .alloc_inode = dax_alloc_inode, .destroy_inode = dax_destroy_inode, .free_inode = dax_free_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, };static int dax_init_fs_context (struct fs_context *fc)
drivers/misc/ibmasm/ibmasmfs.c +1 -1
@@ -94,7 +94,7 @@ static int ibmasmfs_init_fs_context(struct fs_context *fc)static const struct super_operations ibmasmfs_s_ops = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, };static const struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations;
drivers/usb/gadget/function/f_fs.c +1 -1
@@ -1891,7 +1891,7 @@ static struct dentry *ffs_sb_create_file(struct super_block *sb,/* Super block */ static const struct super_operations ffs_sb_operations = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, };struct ffs_sb_fill_data {
drivers/usb/gadget/legacy/inode.c +1 -1
@@ -2011,7 +2011,7 @@ gadgetfs_create_file (struct super_block *sb, char const *name,static const struct super_operations gadget_fs_operations = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, }; static int
fs/9p/vfs_super.c +1 -1
@@ -252,7 +252,7 @@ static int v9fs_drop_inode(struct inode *inode) v9ses =v9fs_inode2v9ses (inode);if (v9ses->cache & (CACHE_META |CACHE_LOOSE )) -return generic_drop_inode (inode); +return inode_generic_drop (inode);/* * in case of non cached mode always drop the * inode because we want the inode attribute
fs/afs/inode.c +2 -2
@@ -723,9 +723,9 @@ int afs_drop_inode(struct inode *inode)_enter ("" );if (test_bit (AFS_VNODE_PSEUDODIR , &AFS_FS_I (inode)->flags)) -return generic_delete_inode (inode); +return inode_just_drop (inode);else -return generic_drop_inode (inode); +return inode_generic_drop (inode); }/*
fs/btrfs/inode.c +1 -1
@@ -7974,7 +7974,7 @@ int btrfs_drop_inode(struct inode *inode)if (btrfs_root_refs (&root->root_item) ==0 )return 1 ;else -return generic_drop_inode (inode); +return inode_generic_drop (inode); }static void init_once (void *foo)
fs/ceph/super.c +1 -1
@@ -1042,7 +1042,7 @@ static const struct super_operations ceph_super_ops = { .alloc_inode = ceph_alloc_inode, .free_inode = ceph_free_inode, .write_inode = ceph_write_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = ceph_evict_inode, .sync_fs = ceph_sync_fs, .put_super = ceph_put_super,
fs/configfs/mount.c +1 -1
@@ -36,7 +36,7 @@ static void configfs_free_inode(struct inode *inode)static const struct super_operations configfs_ops = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .free_inode = configfs_free_inode, };
fs/efivarfs/super.c +1 -1
@@ -127,7 +127,7 @@ static int efivarfs_unfreeze_fs(struct super_block *sb);static const struct super_operations efivarfs_ops = { .statfs = efivarfs_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .alloc_inode = efivarfs_alloc_inode, .free_inode = efivarfs_free_inode, .show_options = efivarfs_show_options,
fs/ext4/super.c +1 -1
@@ -1417,7 +1417,7 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)static int ext4_drop_inode (struct inode *inode) { -int drop =generic_drop_inode (inode); +int drop =inode_generic_drop (inode);if (!drop) drop =fscrypt_drop_inode (inode);
fs/f2fs/super.c +1 -1
@@ -1768,7 +1768,7 @@ static int f2fs_drop_inode(struct inode *inode)trace_f2fs_drop_inode (inode,0 );return 0 ; } - ret =generic_drop_inode (inode); + ret =inode_generic_drop (inode);if (!ret) ret =fscrypt_drop_inode (inode);trace_f2fs_drop_inode (inode, ret);
fs/fuse/inode.c +1 -1
@@ -1209,7 +1209,7 @@ static const struct super_operations fuse_super_operations = { .free_inode = fuse_free_inode, .evict_inode = fuse_evict_inode, .write_inode = fuse_write_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .umount_begin = fuse_umount_begin, .statfs = fuse_statfs, .sync_fs = fuse_sync_fs,
fs/gfs2/super.c +1 -1
@@ -1050,7 +1050,7 @@ static int gfs2_drop_inode(struct inode *inode)if (test_bit (SDF_EVICTING , &sdp->sd_flags))return 1 ; -return generic_drop_inode (inode); +return inode_generic_drop (inode); }/**
fs/hostfs/hostfs_kern.c +1 -1
@@ -261,7 +261,7 @@ static int hostfs_show_options(struct seq_file *seq, struct dentry *root)static const struct super_operations hostfs_sbops = { .alloc_inode = hostfs_alloc_inode, .free_inode = hostfs_free_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = hostfs_evict_inode, .statfs = hostfs_statfs, .show_options = hostfs_show_options,
fs/inode.c +3 -3
@@ -1838,11 +1838,11 @@ int insert_inode_locked4(struct inode *inode, unsigned long hashval,EXPORT_SYMBOL (insert_inode_locked4); -int generic_delete_inode (struct inode *inode) +int inode_just_drop (struct inode *inode) {return 1 ; } -EXPORT_SYMBOL (generic_delete_inode); +EXPORT_SYMBOL (inode_just_drop);/* * Called when we're dropping the last reference
@@ -1866,7 +1866,7 @@ static void iput_final(struct inode *inode)if (op->drop_inode) drop = op->drop_inode (inode);else - drop =generic_drop_inode (inode); + drop =inode_generic_drop (inode); if (!drop && !(inode->i_state & I_DONTCACHE) &&
fs/kernfs/mount.c +1 -1
@@ -57,7 +57,7 @@ static int kernfs_statfs(struct dentry *dentry, struct kstatfs *buf)const struct super_operations kernfs_sops = { .statfs = kernfs_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = kernfs_evict_inode, .show_options = kernfs_sop_show_options,
fs/nfs/inode.c +1 -1
@@ -108,7 +108,7 @@ u64 nfs_compat_user_ino64(u64 fileid)int nfs_drop_inode (struct inode *inode) { -return NFS_STALE (inode) ||generic_drop_inode (inode); +return NFS_STALE (inode) ||inode_generic_drop (inode); }EXPORT_SYMBOL_GPL (nfs_drop_inode);
fs/ocfs2/dlmfs/dlmfs.c +1 -1
@@ -547,7 +547,7 @@ static const struct super_operations dlmfs_ops = { .alloc_inode = dlmfs_alloc_inode, .free_inode = dlmfs_free_inode, .evict_inode = dlmfs_evict_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, };static const struct inode_operations dlmfs_file_inode_operations = {
fs/orangefs/super.c +1 -1
@@ -306,7 +306,7 @@ static const struct super_operations orangefs_s_ops = { .free_inode = orangefs_free_inode, .destroy_inode = orangefs_destroy_inode, .write_inode = orangefs_write_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .statfs = orangefs_statfs, .show_options = orangefs_show_options, };
fs/overlayfs/super.c +1 -1
@@ -280,7 +280,7 @@ static const struct super_operations ovl_super_operations = { .alloc_inode = ovl_alloc_inode, .free_inode = ovl_free_inode, .destroy_inode = ovl_destroy_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .put_super = ovl_put_super, .sync_fs = ovl_sync_fs, .statfs = ovl_statfs,
fs/pidfs.c +1 -1
@@ -718,7 +718,7 @@ static void pidfs_evict_inode(struct inode *inode) }static const struct super_operations pidfs_sops = { - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = pidfs_evict_inode, .statfs = simple_statfs, };
fs/proc/inode.c +1 -1
@@ -187,7 +187,7 @@ static int proc_show_options(struct seq_file *seq, struct dentry *root)const struct super_operations proc_sops = { .alloc_inode = proc_alloc_inode, .free_inode = proc_free_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = proc_evict_inode, .statfs = simple_statfs, .show_options = proc_show_options,
fs/pstore/inode.c +1 -1
@@ -282,7 +282,7 @@ static int pstore_reconfigure(struct fs_context *fc)static const struct super_operations pstore_ops = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = pstore_evict_inode, .show_options = pstore_show_options, };
fs/ramfs/inode.c +1 -1
@@ -215,7 +215,7 @@ static int ramfs_show_options(struct seq_file *m, struct dentry *root)static const struct super_operations ramfs_ops = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .show_options = ramfs_show_options, };
fs/smb/client/cifsfs.c +1 -1
@@ -857,7 +857,7 @@ static int cifs_drop_inode(struct inode *inode)/* no serverino => unconditional eviction */ return !(cifs_sb->mnt_cifs_flags &CIFS_MOUNT_SERVER_INUM ) || -generic_drop_inode (inode); +inode_generic_drop (inode); }static const struct super_operations cifs_super_ops = {
fs/ubifs/super.c +1 -1
@@ -335,7 +335,7 @@ static int ubifs_write_inode(struct inode *inode, struct writeback_control *wbc)static int ubifs_drop_inode (struct inode *inode) { -int drop =generic_drop_inode (inode); +int drop =inode_generic_drop (inode);if (!drop) drop =fscrypt_drop_inode (inode);
fs/xfs/xfs_super.c +1 -1
@@ -778,7 +778,7 @@ xfs_fs_drop_inode(return 0 ; } -return generic_drop_inode (inode); +return inode_generic_drop (inode); }STATIC void
include/linux/fs.h +2 -2
@@ -3314,8 +3314,8 @@ extern void address_space_init_once(struct address_space *mapping);extern struct inode *igrab (struct inode *);extern ino_t iunique (struct super_block *,ino_t );extern int inode_needs_sync (struct inode *inode); -extern int generic_delete_inode (struct inode *inode); -static inline int generic_drop_inode (struct inode *inode) +extern int inode_just_drop (struct inode *inode); +static inline int inode_generic_drop (struct inode *inode) {return !inode->i_nlink ||inode_unhashed (inode); }
kernel/bpf/inode.c +1 -1
@@ -788,7 +788,7 @@ static void bpf_free_inode(struct inode *inode)const struct super_operations bpf_super_ops = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .show_options = bpf_show_options, .free_inode = bpf_free_inode, };
mm/shmem.c +1 -1
@@ -5341,7 +5341,7 @@ static const struct super_operations shmem_ops = { .get_dquots = shmem_get_dquots, #endif .evict_inode = shmem_evict_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .put_super = shmem_put_super, #ifdef CONFIG_TRANSPARENT_HUGEPAGE .nr_cached_objects = shmem_unused_huge_count,
Signature · 1 line
2.43.0
Quoted 9 lines · Mateusz Guzik
generic_delete_inode()is rather misleading for what the routine is doing.inode_just_drop()should be much clearer.The new naming is inconsistent with
generic_drop_inode(), so rename that one as well withinode_as the suffix.No functional changes.
Signed-off-by Mateusz Guzik <[email protected]>
Better name than in was :) feel free to add:
Honza
Quoted 517 lines
---
Generated on top of master with:
git grep --files-with-matches -E '(generic_delete_inode|generic_drop_inode)' | xargs sed -i 's/generic_delete_inode/inode_just_drop/; s/generic_drop_inode/inode_generic_drop/'[is there a handier way?]
I'm not going to argue for the names and I'm not going to protest if someone else submits their own sedpatch.
Documentation/filesystems/porting.rst | 4 ++-- Documentation/filesystems/vfs.rst | 4 ++-- block/bdev.c | 2 +- drivers/dax/super.c | 2 +- drivers/misc/ibmasm/ibmasmfs.c | 2 +- drivers/usb/gadget/function/f_fs.c | 2 +- drivers/usb/gadget/legacy/inode.c | 2 +- fs/9p/vfs_super.c | 2 +- fs/afs/inode.c | 4 ++-- fs/btrfs/inode.c | 2 +- fs/ceph/super.c | 2 +- fs/configfs/mount.c | 2 +- fs/efivarfs/super.c | 2 +- fs/ext4/super.c | 2 +- fs/f2fs/super.c | 2 +- fs/fuse/inode.c | 2 +- fs/gfs2/super.c | 2 +- fs/hostfs/hostfs_kern.c | 2 +- fs/inode.c | 6 +++--- fs/kernfs/mount.c | 2 +- fs/nfs/inode.c | 2 +- fs/ocfs2/dlmfs/dlmfs.c | 2 +- fs/orangefs/super.c | 2 +- fs/overlayfs/super.c | 2 +- fs/pidfs.c | 2 +- fs/proc/inode.c | 2 +- fs/pstore/inode.c | 2 +- fs/ramfs/inode.c | 2 +- fs/smb/client/cifsfs.c | 2 +- fs/ubifs/super.c | 2 +- fs/xfs/xfs_super.c | 2 +- include/linux/fs.h | 4 ++-- kernel/bpf/inode.c | 2 +- mm/shmem.c | 2 +- 34 files changed, 40 insertions(+), 40 deletions(-)Documentation/filesystems/porting.rst +2
-2@@ -340,8 +340,8 @@ of those. Caller makes sure async writeback cannot be running for the inode whil ->drop_inode() returns int now; it's called on final iput() with inode->i_lock held and it returns true if filesystems wants the inode to be -dropped. As before, generic_drop_inode() is still the default and it's been -updated appropriately. generic_delete_inode() is also alive and it consists +dropped. As before, inode_generic_drop() is still the default and it's been +updated appropriately. inode_just_drop() is also alive and it consists simply of return 1. Note that all actual eviction work is done by caller after ->drop_inode() returns.Documentation/filesystems/vfs.rst +2
-2@@ -327,11 +327,11 @@ or bottom half). inode->i_lock spinlock held. This method should be either NULL (normal UNIX filesystem - semantics) or "generic_delete_inode" (for filesystems that do + semantics) or "inode_just_drop" (for filesystems that do not want to cache inodes - causing "delete_inode" to always be called regardless of the value of i_nlink) - The "generic_delete_inode()" behavior is equivalent to the old + The "inode_just_drop()" behavior is equivalent to the old practice of using "force_delete" in the put_inode() case, but does not have the races that the "force_delete()" approach had.block/bdev.c +1
-1@@ -412,7 +412,7 @@ static const struct super_operations bdev_sops = { .statfs = simple_statfs, .alloc_inode = bdev_alloc_inode, .free_inode = bdev_free_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = bdev_evict_inode, };drivers/dax/super.c +1
-1@@ -388,7 +388,7 @@ static const struct super_operations dax_sops = { .alloc_inode = dax_alloc_inode, .destroy_inode = dax_destroy_inode, .free_inode = dax_free_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, };static int dax_init_fs_context (struct fs_context *fc)drivers/misc/ibmasm/ibmasmfs.c +1
-1@@ -94,7 +94,7 @@ static int ibmasmfs_init_fs_context(struct fs_context *fc)static const struct super_operations ibmasmfs_s_ops = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, };static const struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations;drivers/usb/gadget/function/f_fs.c +1
-1@@ -1891,7 +1891,7 @@ static struct dentry *ffs_sb_create_file(struct super_block *sb,/* Super block */ static const struct super_operations ffs_sb_operations = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, };struct ffs_sb_fill_data {drivers/usb/gadget/legacy/inode.c +1
-1@@ -2011,7 +2011,7 @@ gadgetfs_create_file (struct super_block *sb, char const *name,static const struct super_operations gadget_fs_operations = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, }; static intfs/9p/vfs_super.c +1
-1@@ -252,7 +252,7 @@ static int v9fs_drop_inode(struct inode *inode) v9ses =v9fs_inode2v9ses (inode);if (v9ses->cache & (CACHE_META |CACHE_LOOSE )) -return generic_drop_inode (inode); +return inode_generic_drop (inode);/* * in case of non cached mode always drop the * inode because we want the inode attribute fs/afs/inode.c +2
-2@@ -723,9 +723,9 @@ int afs_drop_inode(struct inode *inode)_enter ("" );if (test_bit (AFS_VNODE_PSEUDODIR , &AFS_FS_I (inode)->flags)) -return generic_delete_inode (inode); +return inode_just_drop (inode);else -return generic_drop_inode (inode); +return inode_generic_drop (inode); }/* fs/btrfs/inode.c +1
-1@@ -7974,7 +7974,7 @@ int btrfs_drop_inode(struct inode *inode)if (btrfs_root_refs (&root->root_item) ==0 )return 1 ;else -return generic_drop_inode (inode); +return inode_generic_drop (inode); }static void init_once (void *foo)fs/ceph/super.c +1
-1@@ -1042,7 +1042,7 @@ static const struct super_operations ceph_super_ops = { .alloc_inode = ceph_alloc_inode, .free_inode = ceph_free_inode, .write_inode = ceph_write_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = ceph_evict_inode, .sync_fs = ceph_sync_fs, .put_super = ceph_put_super,fs/configfs/mount.c +1
-1@@ -36,7 +36,7 @@ static void configfs_free_inode(struct inode *inode)static const struct super_operations configfs_ops = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .free_inode = configfs_free_inode, };fs/efivarfs/super.c +1
-1@@ -127,7 +127,7 @@ static int efivarfs_unfreeze_fs(struct super_block *sb);static const struct super_operations efivarfs_ops = { .statfs = efivarfs_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .alloc_inode = efivarfs_alloc_inode, .free_inode = efivarfs_free_inode, .show_options = efivarfs_show_options,fs/ext4/super.c +1
-1@@ -1417,7 +1417,7 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)static int ext4_drop_inode (struct inode *inode) { -int drop =generic_drop_inode (inode); +int drop =inode_generic_drop (inode);if (!drop) drop =fscrypt_drop_inode (inode);fs/f2fs/super.c +1
-1@@ -1768,7 +1768,7 @@ static int f2fs_drop_inode(struct inode *inode)trace_f2fs_drop_inode (inode,0 );return 0 ; } - ret =generic_drop_inode (inode); + ret =inode_generic_drop (inode);if (!ret) ret =fscrypt_drop_inode (inode);trace_f2fs_drop_inode (inode, ret);fs/fuse/inode.c +1
-1@@ -1209,7 +1209,7 @@ static const struct super_operations fuse_super_operations = { .free_inode = fuse_free_inode, .evict_inode = fuse_evict_inode, .write_inode = fuse_write_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .umount_begin = fuse_umount_begin, .statfs = fuse_statfs, .sync_fs = fuse_sync_fs,fs/gfs2/super.c +1
-1@@ -1050,7 +1050,7 @@ static int gfs2_drop_inode(struct inode *inode)if (test_bit (SDF_EVICTING , &sdp->sd_flags))return 1 ; -return generic_drop_inode (inode); +return inode_generic_drop (inode); }/** fs/hostfs/hostfs_kern.c +1
-1@@ -261,7 +261,7 @@ static int hostfs_show_options(struct seq_file *seq, struct dentry *root)static const struct super_operations hostfs_sbops = { .alloc_inode = hostfs_alloc_inode, .free_inode = hostfs_free_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = hostfs_evict_inode, .statfs = hostfs_statfs, .show_options = hostfs_show_options,fs/inode.c +3
-3@@ -1838,11 +1838,11 @@ int insert_inode_locked4(struct inode *inode, unsigned long hashval,EXPORT_SYMBOL (insert_inode_locked4); -int generic_delete_inode (struct inode *inode) +int inode_just_drop (struct inode *inode) {return 1 ; } -EXPORT_SYMBOL (generic_delete_inode); +EXPORT_SYMBOL (inode_just_drop);/* * Called when we're dropping the last reference @@ -1866,7 +1866,7 @@ static void iput_final(struct inode *inode)if (op->drop_inode) drop = op->drop_inode (inode);else - drop =generic_drop_inode (inode); + drop =inode_generic_drop (inode); if (!drop && !(inode->i_state & I_DONTCACHE) &&fs/kernfs/mount.c +1
-1@@ -57,7 +57,7 @@ static int kernfs_statfs(struct dentry *dentry, struct kstatfs *buf)const struct super_operations kernfs_sops = { .statfs = kernfs_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = kernfs_evict_inode, .show_options = kernfs_sop_show_options,fs/nfs/inode.c +1
-1@@ -108,7 +108,7 @@ u64 nfs_compat_user_ino64(u64 fileid)int nfs_drop_inode (struct inode *inode) { -return NFS_STALE (inode) ||generic_drop_inode (inode); +return NFS_STALE (inode) ||inode_generic_drop (inode); }EXPORT_SYMBOL_GPL (nfs_drop_inode);fs/ocfs2/dlmfs/dlmfs.c +1
-1@@ -547,7 +547,7 @@ static const struct super_operations dlmfs_ops = { .alloc_inode = dlmfs_alloc_inode, .free_inode = dlmfs_free_inode, .evict_inode = dlmfs_evict_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, };static const struct inode_operations dlmfs_file_inode_operations = {fs/orangefs/super.c +1
-1@@ -306,7 +306,7 @@ static const struct super_operations orangefs_s_ops = { .free_inode = orangefs_free_inode, .destroy_inode = orangefs_destroy_inode, .write_inode = orangefs_write_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .statfs = orangefs_statfs, .show_options = orangefs_show_options, };fs/overlayfs/super.c +1
-1@@ -280,7 +280,7 @@ static const struct super_operations ovl_super_operations = { .alloc_inode = ovl_alloc_inode, .free_inode = ovl_free_inode, .destroy_inode = ovl_destroy_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .put_super = ovl_put_super, .sync_fs = ovl_sync_fs, .statfs = ovl_statfs,fs/pidfs.c +1
-1@@ -718,7 +718,7 @@ static void pidfs_evict_inode(struct inode *inode) }static const struct super_operations pidfs_sops = { - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = pidfs_evict_inode, .statfs = simple_statfs, };fs/proc/inode.c +1
-1@@ -187,7 +187,7 @@ static int proc_show_options(struct seq_file *seq, struct dentry *root)const struct super_operations proc_sops = { .alloc_inode = proc_alloc_inode, .free_inode = proc_free_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = proc_evict_inode, .statfs = simple_statfs, .show_options = proc_show_options,fs/pstore/inode.c +1
-1@@ -282,7 +282,7 @@ static int pstore_reconfigure(struct fs_context *fc)static const struct super_operations pstore_ops = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .evict_inode = pstore_evict_inode, .show_options = pstore_show_options, };fs/ramfs/inode.c +1
-1@@ -215,7 +215,7 @@ static int ramfs_show_options(struct seq_file *m, struct dentry *root)static const struct super_operations ramfs_ops = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .show_options = ramfs_show_options, };fs/smb/client/cifsfs.c +1
-1@@ -857,7 +857,7 @@ static int cifs_drop_inode(struct inode *inode)/* no serverino => unconditional eviction */ return !(cifs_sb->mnt_cifs_flags &CIFS_MOUNT_SERVER_INUM ) || -generic_drop_inode (inode); +inode_generic_drop (inode); }static const struct super_operations cifs_super_ops = {fs/ubifs/super.c +1
-1@@ -335,7 +335,7 @@ static int ubifs_write_inode(struct inode *inode, struct writeback_control *wbc)static int ubifs_drop_inode (struct inode *inode) { -int drop =generic_drop_inode (inode); +int drop =inode_generic_drop (inode);if (!drop) drop =fscrypt_drop_inode (inode);fs/xfs/xfs_super.c +1
-1@@ -778,7 +778,7 @@ xfs_fs_drop_inode(return 0 ; } -return generic_drop_inode (inode); +return inode_generic_drop (inode); }STATIC voidinclude/linux/fs.h +2
-2@@ -3314,8 +3314,8 @@ extern void address_space_init_once(struct address_space *mapping);extern struct inode *igrab (struct inode *);extern ino_t iunique (struct super_block *,ino_t );extern int inode_needs_sync (struct inode *inode); -extern int generic_delete_inode (struct inode *inode); -static inline int generic_drop_inode (struct inode *inode) +extern int inode_just_drop (struct inode *inode); +static inline int inode_generic_drop (struct inode *inode) {return !inode->i_nlink ||inode_unhashed (inode); }kernel/bpf/inode.c +1
-1@@ -788,7 +788,7 @@ static void bpf_free_inode(struct inode *inode)const struct super_operations bpf_super_ops = { .statfs = simple_statfs, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .show_options = bpf_show_options, .free_inode = bpf_free_inode, };mm/shmem.c +1
-1@@ -5341,7 +5341,7 @@ static const struct super_operations shmem_ops = { .get_dquots = shmem_get_dquots, #endif .evict_inode = shmem_evict_inode, - .drop_inode = generic_delete_inode, + .drop_inode = inode_just_drop, .put_super = shmem_put_super, #ifdef CONFIG_TRANSPARENT_HUGEPAGE .nr_cached_objects = shmem_unused_huge_count,Signature · 1 line
2.43.0
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 9 lines · Mateusz Guzik
generic_delete_inode()is rather misleading for what the routine is doing.inode_just_drop()should be much clearer.The new naming is inconsistent with
generic_drop_inode(), so rename that one as well withinode_as the suffix.No functional changes.
[...]
Applied to the vfs-6.18.misc branch of the vfs/vfs.git tree. Patches in the vfs-6.18.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs-6.18.misc
[1/1] fs: rename generic_delete_inode() and generic_drop_inode()
https://git.kernel.org/vfs/vfs/c/f99b3917789d