Remove unnecessary #[inline] attributes

This commit is contained in:
stuuupidcat
2025-05-20 16:13:24 +00:00
committed by Tate, Hongliang Tian
parent e81053b9dc
commit 95744692a5
6 changed files with 0 additions and 9 deletions

View File

@ -410,7 +410,6 @@ impl Ext2 {
Ok(())
}
#[inline]
fn block_group_of_bid(&self, bid: Ext2Bid) -> Result<(usize, &BlockGroup)> {
let block_group_idx = (bid / self.blocks_per_group) as usize;
if block_group_idx >= self.block_groups.len() {
@ -419,7 +418,6 @@ impl Ext2 {
Ok((block_group_idx, &self.block_groups[block_group_idx]))
}
#[inline]
fn block_group_of_ino(&self, ino: u32) -> Result<(usize, &BlockGroup)> {
let block_group_idx = ((ino - 1) / self.inodes_per_group) as usize;
if block_group_idx >= self.block_groups.len() {
@ -428,12 +426,10 @@ impl Ext2 {
Ok((block_group_idx, &self.block_groups[block_group_idx]))
}
#[inline]
fn inode_idx(&self, ino: u32) -> u32 {
(ino - 1) % self.inodes_per_group
}
#[inline]
fn block_idx(&self, bid: Ext2Bid) -> Ext2Bid {
bid % self.blocks_per_group
}

View File

@ -128,7 +128,6 @@ impl IndirectBlockCache {
Ok(())
}
#[inline]
fn fs(&self) -> Arc<Ext2> {
self.fs.upgrade().unwrap()
}

View File

@ -2196,7 +2196,6 @@ impl InodeDesc {
blocks
}
#[inline]
fn size_to_blocks(&self, size: usize) -> Ext2Bid {
if self.type_ == InodeType::SymLink && size <= MAX_FAST_SYMLINK_LEN {
return 0;