summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2025-04-23 18:53:57 +0200
committerDavid Sterba <dsterba@suse.com>2025-05-15 14:30:49 +0200
commitf963e0128b180e8ab501bf1d5772fce17c36d68f (patch)
tree31cedb1df93b43743ac2e27ddd1cd5d13900128e /fs/btrfs/inode.c
parent73d6bcf41bd2e9906060bcc8b182cdb9775e61f9 (diff)
btrfs: trivial conversion to return bool instead of int
Old code has a lot of int for bool return values, bool is recommended and done in new code. Convert the trivial cases that do simple 0/false and 1/true. Functions comment are updated if needed. Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 7f64725b95b3..925a3c880d36 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3733,9 +3733,9 @@ out:
*
* slot is the slot the inode is in, objectid is the objectid of the inode
*/
-static noinline int acls_after_inode_item(struct extent_buffer *leaf,
- int slot, u64 objectid,
- int *first_xattr_slot)
+static noinline bool acls_after_inode_item(struct extent_buffer *leaf,
+ int slot, u64 objectid,
+ int *first_xattr_slot)
{
u32 nritems = btrfs_header_nritems(leaf);
struct btrfs_key found_key;
@@ -3757,7 +3757,7 @@ static noinline int acls_after_inode_item(struct extent_buffer *leaf,
/* we found a different objectid, there must not be acls */
if (found_key.objectid != objectid)
- return 0;
+ return false;
/* we found an xattr, assume we've got an acl */
if (found_key.type == BTRFS_XATTR_ITEM_KEY) {
@@ -3765,7 +3765,7 @@ static noinline int acls_after_inode_item(struct extent_buffer *leaf,
*first_xattr_slot = slot;
if (found_key.offset == xattr_access ||
found_key.offset == xattr_default)
- return 1;
+ return true;
}
/*
@@ -3773,7 +3773,7 @@ static noinline int acls_after_inode_item(struct extent_buffer *leaf,
* be any acls later on
*/
if (found_key.type > BTRFS_XATTR_ITEM_KEY)
- return 0;
+ return false;
slot++;
scanned++;
@@ -3793,7 +3793,7 @@ static noinline int acls_after_inode_item(struct extent_buffer *leaf,
*/
if (*first_xattr_slot == -1)
*first_xattr_slot = slot;
- return 1;
+ return true;
}
static int btrfs_init_file_extent_tree(struct btrfs_inode *inode)