Skip to content

Commit 4225756

Browse files
committed
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>
1 parent 6d2f07e commit 4225756

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

fs/btrfs/defrag.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,14 @@ static int compare_inode_defrag(const struct inode_defrag *defrag1,
6161
}
6262

6363
/*
64-
* Pop a record for an inode into the defrag tree. The lock must be held
64+
* Insert a record for an inode into the defrag tree. The lock must be held
6565
* already.
6666
*
6767
* If you're inserting a record for an older transid than an existing record,
6868
* the transid already in the tree is lowered.
69-
*
70-
* If an existing record is found the defrag item you pass in is freed.
7169
*/
72-
static int __btrfs_add_inode_defrag(struct btrfs_inode *inode,
73-
struct inode_defrag *defrag)
70+
static int btrfs_insert_inode_defrag(struct btrfs_inode *inode,
71+
struct inode_defrag *defrag)
7472
{
7573
struct btrfs_fs_info *fs_info = inode->root->fs_info;
7674
struct inode_defrag *entry;
@@ -157,7 +155,7 @@ int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans,
157155
* and then re-read this inode, this new inode doesn't have
158156
* IN_DEFRAG flag. At the case, we may find the existed defrag.
159157
*/
160-
ret = __btrfs_add_inode_defrag(inode, defrag);
158+
ret = btrfs_insert_inode_defrag(inode, defrag);
161159
if (ret)
162160
kmem_cache_free(btrfs_inode_defrag_cachep, defrag);
163161
} else {

0 commit comments

Comments
 (0)