Skip to content

Commit

Permalink
udf: Drop load_block_bitmap() wrapper
Browse files Browse the repository at this point in the history
The wrapper is completely pointless as all the checks are already done
in __load_block_bitmap(). Just drop it and rename __load_block_bitmap().

Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
jankara committed Jun 26, 2024
1 parent a90d447 commit 8037da3
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions fs/udf/balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ static int read_block_bitmap(struct super_block *sb,
return 0;
}

static int __load_block_bitmap(struct super_block *sb,
struct udf_bitmap *bitmap,
unsigned int block_group)
static int load_block_bitmap(struct super_block *sb,
struct udf_bitmap *bitmap,
unsigned int block_group)
{
int retval = 0;
int nr_groups = bitmap->s_nr_groups;
Expand All @@ -102,23 +102,6 @@ static int __load_block_bitmap(struct super_block *sb,
return block_group;
}

static inline int load_block_bitmap(struct super_block *sb,
struct udf_bitmap *bitmap,
unsigned int block_group)
{
int slot;

slot = __load_block_bitmap(sb, bitmap, block_group);

if (slot < 0)
return slot;

if (!bitmap->s_block_bitmap[slot])
return -EIO;

return slot;
}

static void udf_add_free_space(struct super_block *sb, u16 partition, u32 cnt)
{
struct udf_sb_info *sbi = UDF_SB(sb);
Expand Down

0 comments on commit 8037da3

Please sign in to comment.