diff options
author | David Sterba <dsterba@suse.com> | 2024-08-27 04:10:11 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-09-10 16:51:19 +0200 |
commit | 91c9f2855ead841b27eefb8968079290725d4f2e (patch) | |
tree | 288f8fd3fa4946a7bf741da042af9e94132b7e55 /fs/btrfs/defrag.h | |
parent | 276940915f232f8569124811fd8a9524f27f5748 (diff) |
btrfs: return void from btrfs_add_inode_defrag()
The potential memory allocation failure is not a fatal error, skipping
autodefrag is fine and the caller inode_should_defrag() does not care
about the errors. Further writes can attempt to add the inode back to
the defragmentation list again.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/defrag.h')
-rw-r--r-- | fs/btrfs/defrag.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/defrag.h b/fs/btrfs/defrag.h index 878528e086fb..97f36ab3f24d 100644 --- a/fs/btrfs/defrag.h +++ b/fs/btrfs/defrag.h @@ -18,8 +18,8 @@ int btrfs_defrag_file(struct inode *inode, struct file_ra_state *ra, u64 newer_than, unsigned long max_to_defrag); int __init btrfs_auto_defrag_init(void); void __cold btrfs_auto_defrag_exit(void); -int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans, - struct btrfs_inode *inode, u32 extent_thresh); +void btrfs_add_inode_defrag(struct btrfs_trans_handle *trans, + struct btrfs_inode *inode, u32 extent_thresh); int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info); void btrfs_cleanup_defrag_inodes(struct btrfs_fs_info *fs_info); int btrfs_defrag_root(struct btrfs_root *root); |