seq_file: use proc_create() in documentation
PATCH 1/1 seq_file: use proc_create() in documentation
Using create_proc_entry() + ->proc_fops assignment is racy because ->proc_fops will be NULL for some time, use proc_create() to avoid race.
---
Documentation/filesystems/seq_file.txt | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
Documentation/filesystems/seq_file.txt +1 -3
@@ -248,9 +248,7 @@ code, that is done in the initialization code in the usual way: { struct proc_dir_entry *entry; - entry = create_proc_entry("sequence", 0, NULL); - if (entry) - entry->proc_fops = &ct_file_ops; + proc_create("sequence", 0, NULL, &ct_file_ops); return 0; }