@@ -29,13 +29,12 @@ macro_rules! module_log {
29
29
}
30
30
31
31
#[ allow( unused_variables) ]
32
- fn bind_mount ( reason : & str , src : & Utf8CStr , dest : & Utf8CStr , rec : bool ) -> OsResultStatic < ( ) > {
32
+ fn bind_mount ( reason : & str , src : & Utf8CStr , dest : & Utf8CStr , rec : bool ) {
33
33
module_log ! ( reason, dest, src) ;
34
34
// Ignore any kind of error here. If a single bind mount fails due to selinux permissions or
35
35
// kernel limitations, don't let it break module mount entirely.
36
36
src. bind_mount_to ( dest, rec) . log_ok ( ) ;
37
37
dest. remount_mount_point_flags ( MS_RDONLY ) . log_ok ( ) ;
38
- Ok ( ( ) )
39
38
}
40
39
41
40
fn mount_dummy ( reason : & str , src : & Utf8CStr , dest : & Utf8CStr , is_dir : bool ) -> OsResultStatic < ( ) > {
@@ -44,7 +43,8 @@ fn mount_dummy(reason: &str, src: &Utf8CStr, dest: &Utf8CStr, is_dir: bool) -> O
44
43
} else {
45
44
dest. create ( O_CREAT | O_RDONLY | O_CLOEXEC , 0o000 ) ?;
46
45
}
47
- bind_mount ( reason, src, dest, false )
46
+ bind_mount ( reason, src, dest, false ) ;
47
+ Ok ( ( ) )
48
48
}
49
49
50
50
// File path that act like a stack, popping out the last element
@@ -248,7 +248,7 @@ impl FsNode {
248
248
self . commit_tmpfs ( path. reborrow ( ) ) ?;
249
249
// Transitioning from non-tmpfs to tmpfs, we need to actually mount the
250
250
// worker dir to dest after all children are committed.
251
- bind_mount ( "move" , path. worker ( ) , path. real ( ) , true ) ? ;
251
+ bind_mount ( "move" , path. worker ( ) , path. real ( ) , true ) ;
252
252
} else {
253
253
for ( name, node) in children {
254
254
let path = path. append ( name) ;
@@ -257,7 +257,7 @@ impl FsNode {
257
257
}
258
258
}
259
259
FsNode :: File { src } => {
260
- bind_mount ( "mount" , src, path. real ( ) , false ) ? ;
260
+ bind_mount ( "mount" , src, path. real ( ) , false ) ;
261
261
}
262
262
_ => {
263
263
error ! ( "Unable to handle '{}': parent should be tmpfs" , path. real( ) ) ;
@@ -292,7 +292,7 @@ impl FsNode {
292
292
& src,
293
293
path. real ( ) ,
294
294
matches ! ( node, FsNode :: Directory { .. } ) ,
295
- ) ? ;
295
+ ) ;
296
296
}
297
297
_ => node. commit_tmpfs ( path) ?,
298
298
}
0 commit comments