Skip to content

Commit f99b391

Browse files
mjguzikbrauner
authored andcommitted
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. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 7479260 commit f99b391

34 files changed

Lines changed: 40 additions & 40 deletions

File tree

Documentation/filesystems/porting.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ of those. Caller makes sure async writeback cannot be running for the inode whil
340340

341341
->drop_inode() returns int now; it's called on final iput() with
342342
inode->i_lock held and it returns true if filesystems wants the inode to be
343-
dropped. As before, generic_drop_inode() is still the default and it's been
344-
updated appropriately. generic_delete_inode() is also alive and it consists
343+
dropped. As before, inode_generic_drop() is still the default and it's been
344+
updated appropriately. inode_just_drop() is also alive and it consists
345345
simply of return 1. Note that all actual eviction work is done by caller after
346346
->drop_inode() returns.
347347

Documentation/filesystems/vfs.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,11 @@ or bottom half).
327327
inode->i_lock spinlock held.
328328

329329
This method should be either NULL (normal UNIX filesystem
330-
semantics) or "generic_delete_inode" (for filesystems that do
330+
semantics) or "inode_just_drop" (for filesystems that do
331331
not want to cache inodes - causing "delete_inode" to always be
332332
called regardless of the value of i_nlink)
333333

334-
The "generic_delete_inode()" behavior is equivalent to the old
334+
The "inode_just_drop()" behavior is equivalent to the old
335335
practice of using "force_delete" in the put_inode() case, but
336336
does not have the races that the "force_delete()" approach had.
337337

block/bdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ static const struct super_operations bdev_sops = {
412412
.statfs = simple_statfs,
413413
.alloc_inode = bdev_alloc_inode,
414414
.free_inode = bdev_free_inode,
415-
.drop_inode = generic_delete_inode,
415+
.drop_inode = inode_just_drop,
416416
.evict_inode = bdev_evict_inode,
417417
};
418418

drivers/dax/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ static const struct super_operations dax_sops = {
388388
.alloc_inode = dax_alloc_inode,
389389
.destroy_inode = dax_destroy_inode,
390390
.free_inode = dax_free_inode,
391-
.drop_inode = generic_delete_inode,
391+
.drop_inode = inode_just_drop,
392392
};
393393

394394
static int dax_init_fs_context(struct fs_context *fc)

drivers/misc/ibmasm/ibmasmfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static int ibmasmfs_init_fs_context(struct fs_context *fc)
9494

9595
static const struct super_operations ibmasmfs_s_ops = {
9696
.statfs = simple_statfs,
97-
.drop_inode = generic_delete_inode,
97+
.drop_inode = inode_just_drop,
9898
};
9999

100100
static const struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations;

drivers/usb/gadget/function/f_fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,7 @@ static struct dentry *ffs_sb_create_file(struct super_block *sb,
18911891
/* Super block */
18921892
static const struct super_operations ffs_sb_operations = {
18931893
.statfs = simple_statfs,
1894-
.drop_inode = generic_delete_inode,
1894+
.drop_inode = inode_just_drop,
18951895
};
18961896

18971897
struct ffs_sb_fill_data {

drivers/usb/gadget/legacy/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2011,7 +2011,7 @@ gadgetfs_create_file (struct super_block *sb, char const *name,
20112011

20122012
static const struct super_operations gadget_fs_operations = {
20132013
.statfs = simple_statfs,
2014-
.drop_inode = generic_delete_inode,
2014+
.drop_inode = inode_just_drop,
20152015
};
20162016

20172017
static int

fs/9p/vfs_super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static int v9fs_drop_inode(struct inode *inode)
252252

253253
v9ses = v9fs_inode2v9ses(inode);
254254
if (v9ses->cache & (CACHE_META|CACHE_LOOSE))
255-
return generic_drop_inode(inode);
255+
return inode_generic_drop(inode);
256256
/*
257257
* in case of non cached mode always drop the
258258
* inode because we want the inode attribute

fs/afs/inode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,9 @@ int afs_drop_inode(struct inode *inode)
723723
_enter("");
724724

725725
if (test_bit(AFS_VNODE_PSEUDODIR, &AFS_FS_I(inode)->flags))
726-
return generic_delete_inode(inode);
726+
return inode_just_drop(inode);
727727
else
728-
return generic_drop_inode(inode);
728+
return inode_generic_drop(inode);
729729
}
730730

731731
/*

fs/btrfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7953,7 +7953,7 @@ int btrfs_drop_inode(struct inode *inode)
79537953
if (btrfs_root_refs(&root->root_item) == 0)
79547954
return 1;
79557955
else
7956-
return generic_drop_inode(inode);
7956+
return inode_generic_drop(inode);
79577957
}
79587958

79597959
static void init_once(void *foo)

0 commit comments

Comments
 (0)