Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

btrfs: make btrfs_free_log() and btrfs_free_log_root_tree() return void

These functions never fail, always return success (0) and none of the
callers care about their return values. Change their return type from int
to void.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

Filipe Manana and committed by
David Sterba
e3799e65 b48c980b

+4 -8
+2 -5
fs/btrfs/tree-log.c
··· 3681 3681 * free all the extents used by the tree log. This should be called 3682 3682 * at commit time of the full transaction 3683 3683 */ 3684 - int btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root) 3684 + void btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root) 3685 3685 { 3686 3686 if (root->log_root) { 3687 3687 free_log_tree(trans, root->log_root); 3688 3688 root->log_root = NULL; 3689 3689 clear_bit(BTRFS_ROOT_HAS_LOG_TREE, &root->state); 3690 3690 } 3691 - return 0; 3692 3691 } 3693 3692 3694 - int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, 3695 - struct btrfs_fs_info *fs_info) 3693 + void btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info) 3696 3694 { 3697 3695 if (fs_info->log_root_tree) { 3698 3696 free_log_tree(trans, fs_info->log_root_tree); 3699 3697 fs_info->log_root_tree = NULL; 3700 3698 clear_bit(BTRFS_ROOT_HAS_LOG_TREE, &fs_info->tree_root->state); 3701 3699 } 3702 - return 0; 3703 3700 } 3704 3701 3705 3702 static bool mark_inode_as_not_logged(const struct btrfs_trans_handle *trans,
+2 -3
fs/btrfs/tree-log.h
··· 71 71 72 72 int btrfs_sync_log(struct btrfs_trans_handle *trans, 73 73 struct btrfs_root *root, struct btrfs_log_ctx *ctx); 74 - int btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root); 75 - int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, 76 - struct btrfs_fs_info *fs_info); 74 + void btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root); 75 + void btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info); 77 76 int btrfs_recover_log_trees(struct btrfs_root *tree_root); 78 77 int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans, 79 78 struct dentry *dentry,