@@ -10,7 +10,6 @@ use crate::util::Address;
1010use num_traits:: FromPrimitive ;
1111use ranges:: BitByteRange ;
1212use std:: fmt;
13- use std:: io:: Result ;
1413use std:: sync:: atomic:: { AtomicU8 , Ordering } ;
1514
1615/// This struct stores the specification of a side metadata bit-set.
@@ -1391,7 +1390,7 @@ impl SideMetadataContext {
13911390 start : Address ,
13921391 size : usize ,
13931392 space_name : & str ,
1394- ) -> Result < ( ) > {
1393+ ) -> MmapResult < ( ) > {
13951394 debug ! (
13961395 "try_map_metadata_space({}, 0x{:x}, {}, {})" ,
13971396 start,
@@ -1414,7 +1413,7 @@ impl SideMetadataContext {
14141413 start : Address ,
14151414 size : usize ,
14161415 name : & str ,
1417- ) -> Result < ( ) > {
1416+ ) -> MmapResult < ( ) > {
14181417 debug ! (
14191418 "try_map_metadata_address_range({}, 0x{:x}, {}, {})" ,
14201419 start,
@@ -1441,16 +1440,13 @@ impl SideMetadataContext {
14411440 size : usize ,
14421441 no_reserve : bool ,
14431442 space_name : & str ,
1444- ) -> Result < ( ) > {
1443+ ) -> MmapResult < ( ) > {
14451444 for spec in self . global . iter ( ) {
14461445 let anno = MmapAnnotation :: SideMeta {
14471446 space : space_name,
14481447 meta : spec. name ,
14491448 } ;
1450- match try_mmap_contiguous_metadata_space ( start, size, spec, no_reserve, & anno) {
1451- Ok ( _) => { }
1452- Err ( e) => return Result :: Err ( e) ,
1453- }
1449+ try_mmap_contiguous_metadata_space ( start, size, spec, no_reserve, & anno) ?;
14541450 }
14551451
14561452 #[ cfg( target_pointer_width = "32" ) ]
@@ -1474,10 +1470,7 @@ impl SideMetadataContext {
14741470 space : space_name,
14751471 meta : spec. name ,
14761472 } ;
1477- match try_mmap_contiguous_metadata_space ( start, size, spec, no_reserve, & anno) {
1478- Ok ( _) => { }
1479- Err ( e) => return Result :: Err ( e) ,
1480- }
1473+ try_mmap_contiguous_metadata_space ( start, size, spec, no_reserve, & anno) ?;
14811474 }
14821475 #[ cfg( target_pointer_width = "32" ) ]
14831476 {
@@ -1500,10 +1493,7 @@ impl SideMetadataContext {
15001493 space : space_name,
15011494 meta : "all" ,
15021495 } ;
1503- match try_map_per_chunk_metadata_space ( start, size, lsize, no_reserve, & anno) {
1504- Ok ( _) => { }
1505- Err ( e) => return Result :: Err ( e) ,
1506- }
1496+ try_map_per_chunk_metadata_space ( start, size, lsize, no_reserve, & anno) ?;
15071497 }
15081498
15091499 Ok ( ( ) )
0 commit comments