@@ -689,8 +689,7 @@ void audit_trim_trees(void)
689
689
690
690
tree = container_of (cursor .next , struct audit_tree , list );
691
691
get_tree (tree );
692
- list_del (& cursor );
693
- list_add (& cursor , & tree -> list );
692
+ list_move (& cursor , & tree -> list );
694
693
mutex_unlock (& audit_filter_mutex );
695
694
696
695
err = kern_path (tree -> pathname , 0 , & path );
@@ -899,8 +898,7 @@ int audit_tag_tree(char *old, char *new)
899
898
900
899
tree = container_of (cursor .next , struct audit_tree , list );
901
900
get_tree (tree );
902
- list_del (& cursor );
903
- list_add (& cursor , & tree -> list );
901
+ list_move (& cursor , & tree -> list );
904
902
mutex_unlock (& audit_filter_mutex );
905
903
906
904
err = kern_path (tree -> pathname , 0 , & path2 );
@@ -925,8 +923,7 @@ int audit_tag_tree(char *old, char *new)
925
923
mutex_lock (& audit_filter_mutex );
926
924
spin_lock (& hash_lock );
927
925
if (!tree -> goner ) {
928
- list_del (& tree -> list );
929
- list_add (& tree -> list , & tree_list );
926
+ list_move (& tree -> list , & tree_list );
930
927
}
931
928
spin_unlock (& hash_lock );
932
929
put_tree (tree );
@@ -937,8 +934,7 @@ int audit_tag_tree(char *old, char *new)
937
934
938
935
tree = container_of (barrier .prev , struct audit_tree , list );
939
936
get_tree (tree );
940
- list_del (& tree -> list );
941
- list_add (& tree -> list , & barrier );
937
+ list_move (& tree -> list , & barrier );
942
938
mutex_unlock (& audit_filter_mutex );
943
939
944
940
if (!failed ) {
0 commit comments