File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -355,18 +355,20 @@ impl MountTable {
355355 hmac_level : MountEntryHMACLevel ,
356356 ) -> Result < ( ) , RvError > {
357357 let mut need_persist = false ;
358- let mounts = self . entries . read ( ) ?;
358+ {
359+ let mounts = self . entries . read ( ) ?;
359360
360- for mount_entry in mounts. values ( ) {
361- let mut entry = mount_entry. write ( ) ?;
362- if entry. table . is_empty ( ) {
363- entry. table = MOUNT_TABLE_TYPE . to_string ( ) ;
364- need_persist = true ;
365- }
361+ for mount_entry in mounts. values ( ) {
362+ let mut entry = mount_entry. write ( ) ?;
363+ if entry. table . is_empty ( ) {
364+ entry. table = MOUNT_TABLE_TYPE . to_string ( ) ;
365+ need_persist = true ;
366+ }
366367
367- if entry. hmac . is_empty ( ) && hmac_key. is_some ( ) && hmac_level == MountEntryHMACLevel :: Compat {
368- entry. calc_hmac ( hmac_key. unwrap ( ) ) ?;
369- need_persist = true ;
368+ if entry. hmac . is_empty ( ) && hmac_key. is_some ( ) && hmac_level == MountEntryHMACLevel :: Compat {
369+ entry. calc_hmac ( hmac_key. unwrap ( ) ) ?;
370+ need_persist = true ;
371+ }
370372 }
371373 }
372374
You can’t perform that action at this time.
0 commit comments