mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-27 19:33:23 +00:00
Allow dynamically borrowed mutex guard
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
11e4984df2
commit
d15b4d9115
@ -202,7 +202,7 @@ impl ExfatChain {
|
||||
fn alloc_cluster_from_empty(
|
||||
&mut self,
|
||||
num_to_be_allocated: u32,
|
||||
bitmap: &mut MutexGuard<'_, ExfatBitmap>,
|
||||
bitmap: &mut MutexGuard<ExfatBitmap>,
|
||||
sync_bitmap: bool,
|
||||
) -> Result<ClusterID> {
|
||||
// Search for a continuous chunk big enough
|
||||
@ -228,7 +228,7 @@ impl ExfatChain {
|
||||
&mut self,
|
||||
num_to_be_allocated: u32,
|
||||
sync: bool,
|
||||
bitmap: &mut MutexGuard<'_, ExfatBitmap>,
|
||||
bitmap: &mut MutexGuard<ExfatBitmap>,
|
||||
) -> Result<ClusterID> {
|
||||
let fs = self.fs();
|
||||
let mut alloc_start_cluster = 0;
|
||||
@ -255,7 +255,7 @@ impl ExfatChain {
|
||||
start_physical_cluster: ClusterID,
|
||||
drop_num: u32,
|
||||
sync_bitmap: bool,
|
||||
bitmap: &mut MutexGuard<'_, ExfatBitmap>,
|
||||
bitmap: &mut MutexGuard<ExfatBitmap>,
|
||||
) -> Result<()> {
|
||||
let fs = self.fs();
|
||||
|
||||
|
@ -325,7 +325,7 @@ impl ExfatFS {
|
||||
self.super_block.cluster_size as usize * self.super_block.num_clusters as usize
|
||||
}
|
||||
|
||||
pub(super) fn lock(&self) -> MutexGuard<'_, ()> {
|
||||
pub(super) fn lock(&self) -> MutexGuard<()> {
|
||||
self.mutex.lock()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user