diff options
author | David Sterba <dsterba@suse.com> | 2024-08-27 03:50:43 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-09-10 16:51:19 +0200 |
commit | 42257569026182a877e6eaea70a64fd58842a79f (patch) | |
tree | d182bfcf75a52f5e2f45b2c63998af25527499d4 /fs | |
parent | 6d2f07e13c01b06c6e38117c83df78fea8e9d1a9 (diff) |
btrfs: rename __btrfs_add_inode_defrag() and drop double underscores
The function does not follow the pattern where the underscores would be
justified, so rename it.
Also update the misleading comment, the passed item is not freed, that's
what the caller does.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/defrag.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/btrfs/defrag.c b/fs/btrfs/defrag.c index b735fce21f07..5258dd86dbd8 100644 --- a/fs/btrfs/defrag.c +++ b/fs/btrfs/defrag.c @@ -61,16 +61,14 @@ static int compare_inode_defrag(const struct inode_defrag *defrag1, } /* - * Pop a record for an inode into the defrag tree. The lock must be held + * Insert a record for an inode into the defrag tree. The lock must be held * already. * * If you're inserting a record for an older transid than an existing record, * the transid already in the tree is lowered. - * - * If an existing record is found the defrag item you pass in is freed. */ -static int __btrfs_add_inode_defrag(struct btrfs_inode *inode, - struct inode_defrag *defrag) +static int btrfs_insert_inode_defrag(struct btrfs_inode *inode, + struct inode_defrag *defrag) { struct btrfs_fs_info *fs_info = inode->root->fs_info; struct inode_defrag *entry; @@ -157,7 +155,7 @@ int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans, * and then re-read this inode, this new inode doesn't have * IN_DEFRAG flag. At the case, we may find the existed defrag. */ - ret = __btrfs_add_inode_defrag(inode, defrag); + ret = btrfs_insert_inode_defrag(inode, defrag); if (ret) kmem_cache_free(btrfs_inode_defrag_cachep, defrag); } else { |