File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -6816,12 +6816,10 @@ ftrace_graph_set_hash(struct ftrace_hash *hash, char *buffer)
6816
6816
6817
6817
func_g .len = strlen (func_g .search );
6818
6818
6819
- mutex_lock (& ftrace_lock );
6819
+ guard ( mutex ) (& ftrace_lock );
6820
6820
6821
- if (unlikely (ftrace_disabled )) {
6822
- mutex_unlock (& ftrace_lock );
6821
+ if (unlikely (ftrace_disabled ))
6823
6822
return - ENODEV ;
6824
- }
6825
6823
6826
6824
do_for_each_ftrace_rec (pg , rec ) {
6827
6825
@@ -6837,7 +6835,7 @@ ftrace_graph_set_hash(struct ftrace_hash *hash, char *buffer)
6837
6835
if (entry )
6838
6836
continue ;
6839
6837
if (add_hash_entry (hash , rec -> ip ) == NULL )
6840
- goto out ;
6838
+ return 0 ;
6841
6839
} else {
6842
6840
if (entry ) {
6843
6841
free_hash_entry (hash , entry );
@@ -6846,13 +6844,8 @@ ftrace_graph_set_hash(struct ftrace_hash *hash, char *buffer)
6846
6844
}
6847
6845
}
6848
6846
} while_for_each_ftrace_rec ();
6849
- out :
6850
- mutex_unlock (& ftrace_lock );
6851
6847
6852
- if (fail )
6853
- return - EINVAL ;
6854
-
6855
- return 0 ;
6848
+ return fail ? - EINVAL : 0 ;
6856
6849
}
6857
6850
6858
6851
static ssize_t
You can’t perform that action at this time.
0 commit comments