Commit 6d2f07e1 authored by David Sterba's avatar David Sterba

btrfs: rename __need_auto_defrag() and drop double underscores

The function does not follow the pattern where the underscores would be
justified, so rename it.
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent b7164d9a
...@@ -107,7 +107,7 @@ static int __btrfs_add_inode_defrag(struct btrfs_inode *inode, ...@@ -107,7 +107,7 @@ static int __btrfs_add_inode_defrag(struct btrfs_inode *inode,
return 0; return 0;
} }
static inline int __need_auto_defrag(struct btrfs_fs_info *fs_info) static inline int need_auto_defrag(struct btrfs_fs_info *fs_info)
{ {
if (!btrfs_test_opt(fs_info, AUTO_DEFRAG)) if (!btrfs_test_opt(fs_info, AUTO_DEFRAG))
return 0; return 0;
...@@ -130,7 +130,7 @@ int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans, ...@@ -130,7 +130,7 @@ int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans,
u64 transid; u64 transid;
int ret; int ret;
if (!__need_auto_defrag(fs_info)) if (!need_auto_defrag(fs_info))
return 0; return 0;
if (test_bit(BTRFS_INODE_IN_DEFRAG, &inode->runtime_flags)) if (test_bit(BTRFS_INODE_IN_DEFRAG, &inode->runtime_flags))
...@@ -245,7 +245,7 @@ static int __btrfs_run_defrag_inode(struct btrfs_fs_info *fs_info, ...@@ -245,7 +245,7 @@ static int __btrfs_run_defrag_inode(struct btrfs_fs_info *fs_info,
again: again:
if (test_bit(BTRFS_FS_STATE_REMOUNTING, &fs_info->fs_state)) if (test_bit(BTRFS_FS_STATE_REMOUNTING, &fs_info->fs_state))
goto cleanup; goto cleanup;
if (!__need_auto_defrag(fs_info)) if (!need_auto_defrag(fs_info))
goto cleanup; goto cleanup;
/* Get the inode */ /* Get the inode */
...@@ -306,7 +306,7 @@ int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info) ...@@ -306,7 +306,7 @@ int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info)
if (test_bit(BTRFS_FS_STATE_REMOUNTING, &fs_info->fs_state)) if (test_bit(BTRFS_FS_STATE_REMOUNTING, &fs_info->fs_state))
break; break;
if (!__need_auto_defrag(fs_info)) if (!need_auto_defrag(fs_info))
break; break;
/* find an inode to defrag */ /* find an inode to defrag */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment