Skip to content

Commit 939a9f2

Browse files
fdmananakdave
authored andcommitted
btrfs: switch del_all argument of replay_dir_deletes() from int to bool
The argument has boolean semantics, so change its type from int to bool, making it more clear. Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 718ef7c commit 939a9f2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

fs/btrfs/tree-log.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static noinline int replay_dir_deletes(struct btrfs_trans_handle *trans,
112112
struct btrfs_root *root,
113113
struct btrfs_root *log,
114114
struct btrfs_path *path,
115-
u64 dirid, int del_all);
115+
u64 dirid, bool del_all);
116116
static void wait_log_commit(struct btrfs_root *root, int transid);
117117

118118
/*
@@ -1632,8 +1632,7 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans,
16321632

16331633
if (inode->vfs_inode.i_nlink == 0) {
16341634
if (S_ISDIR(inode->vfs_inode.i_mode)) {
1635-
ret = replay_dir_deletes(trans, root, NULL, path,
1636-
ino, 1);
1635+
ret = replay_dir_deletes(trans, root, NULL, path, ino, true);
16371636
if (ret)
16381637
goto out;
16391638
}
@@ -2284,7 +2283,7 @@ static noinline int replay_dir_deletes(struct btrfs_trans_handle *trans,
22842283
struct btrfs_root *root,
22852284
struct btrfs_root *log,
22862285
struct btrfs_path *path,
2287-
u64 dirid, int del_all)
2286+
u64 dirid, bool del_all)
22882287
{
22892288
u64 range_start;
22902289
u64 range_end;
@@ -2443,8 +2442,8 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb,
24432442
break;
24442443
mode = btrfs_inode_mode(eb, inode_item);
24452444
if (S_ISDIR(mode)) {
2446-
ret = replay_dir_deletes(wc->trans,
2447-
root, log, path, key.objectid, 0);
2445+
ret = replay_dir_deletes(wc->trans, root, log, path,
2446+
key.objectid, false);
24482447
if (ret)
24492448
break;
24502449
}

0 commit comments

Comments
 (0)