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: change for_rename argument of btrfs_record_unlink_dir() to bool

The for_rename argument of btrfs_record_unlink_dir() is defined as an
integer, but the argument is in fact used as a boolean. So change it to
a boolean to make its use more clear.

Reviewed-by: Anand Jain <anand.jain@oracle.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
59fcf388 acfb5a4f

+6 -6
+4 -4
fs/btrfs/inode.c
··· 4425 4425 } 4426 4426 4427 4427 btrfs_record_unlink_dir(trans, BTRFS_I(dir), BTRFS_I(d_inode(dentry)), 4428 - 0); 4428 + false); 4429 4429 4430 4430 ret = btrfs_unlink_inode(trans, BTRFS_I(dir), BTRFS_I(d_inode(dentry)), 4431 4431 &fname.disk_name); ··· 8993 8993 8994 8994 if (old_dentry->d_parent != new_dentry->d_parent) { 8995 8995 btrfs_record_unlink_dir(trans, BTRFS_I(old_dir), 8996 - BTRFS_I(old_inode), 1); 8996 + BTRFS_I(old_inode), true); 8997 8997 btrfs_record_unlink_dir(trans, BTRFS_I(new_dir), 8998 - BTRFS_I(new_inode), 1); 8998 + BTRFS_I(new_inode), true); 8999 8999 } 9000 9000 9001 9001 /* src is a subvolume */ ··· 9261 9261 9262 9262 if (old_dentry->d_parent != new_dentry->d_parent) 9263 9263 btrfs_record_unlink_dir(trans, BTRFS_I(old_dir), 9264 - BTRFS_I(old_inode), 1); 9264 + BTRFS_I(old_inode), true); 9265 9265 9266 9266 if (unlikely(old_ino == BTRFS_FIRST_FREE_OBJECTID)) { 9267 9267 ret = btrfs_unlink_subvol(trans, BTRFS_I(old_dir), old_dentry);
+1 -1
fs/btrfs/tree-log.c
··· 7309 7309 */ 7310 7310 void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans, 7311 7311 struct btrfs_inode *dir, struct btrfs_inode *inode, 7312 - int for_rename) 7312 + bool for_rename) 7313 7313 { 7314 7314 /* 7315 7315 * when we're logging a file, if it hasn't been renamed
+1 -1
fs/btrfs/tree-log.h
··· 100 100 void btrfs_pin_log_trans(struct btrfs_root *root); 101 101 void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans, 102 102 struct btrfs_inode *dir, struct btrfs_inode *inode, 103 - int for_rename); 103 + bool for_rename); 104 104 void btrfs_record_snapshot_destroy(struct btrfs_trans_handle *trans, 105 105 struct btrfs_inode *dir); 106 106 void btrfs_log_new_name(struct btrfs_trans_handle *trans,