summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--us_manager/sspt/sspt_proc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/us_manager/sspt/sspt_proc.c b/us_manager/sspt/sspt_proc.c
index fa3cb5bc..5d5aec6c 100644
--- a/us_manager/sspt/sspt_proc.c
+++ b/us_manager/sspt/sspt_proc.c
@@ -131,15 +131,12 @@ struct sspt_file *sspt_proc_find_file_or_new(struct sspt_proc *proc,
{
struct sspt_file *file;
- list_for_each_entry(file, &proc->file_list, list) {
- if (file->dentry == dentry) {
- return file;
- }
+ file = sspt_proc_find_file(proc, dentry);
+ if (file == NULL) {
+ file = sspt_file_create(name, dentry, 10);
+ sspt_proc_add_file(proc, file);
}
- file = sspt_file_create(name, dentry, 10);
- sspt_proc_add_file(proc, file);
-
return file;
}