@@ -20,6 +20,7 @@ use super::{FsNodeSecurityXattr, PermissionFlags, TaskState};
2020use crate :: task:: { CurrentTask , FullCredentials , Task } ;
2121use crate :: vfs:: { Anon , DirEntry , FileHandle , FileObject , FileSystem , FsNode , OutputBuffer } ;
2222use audit:: { Auditable , audit_decision, audit_todo_decision} ;
23+ use indexmap:: IndexSet ;
2324use selinux:: permission_check:: PermissionCheck ;
2425use selinux:: policy:: FsUseType ;
2526use selinux:: {
@@ -597,15 +598,15 @@ pub(super) struct FileObjectState {
597598pub ( super ) struct FileSystemState {
598599 // Fields used prior to policy-load, to hold mount options, etc.
599600 mount_options : FileSystemMountOptions ,
600- pending_entries : Mutex < HashSet < WeakKey < DirEntry > > > ,
601+ pending_entries : Mutex < IndexSet < WeakKey < DirEntry > > > ,
601602
602603 // Set once the initial policy has been loaded, taking into account `mount_options`.
603604 label : OnceLock < FileSystemLabel > ,
604605}
605606
606607impl FileSystemState {
607608 fn new ( mount_options : FileSystemMountOptions ) -> Self {
608- Self { mount_options, pending_entries : Mutex :: new ( HashSet :: new ( ) ) , label : OnceLock :: new ( ) }
609+ Self { mount_options, pending_entries : Mutex :: new ( IndexSet :: new ( ) ) , label : OnceLock :: new ( ) }
609610 }
610611
611612 /// Returns the resolved `FileSystemLabel`, or `None` if no policy has yet been loaded.
0 commit comments