From: Alexey Dobriyan Date: Wed, 16 Dec 2009 00:47:00 +0000 (-0800) Subject: seq_file: use proc_create() in documentation X-Git-Tag: v2.6.33-rc1~71^2~95 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=6be4b78993498c253e99b12c4d0f7684a36955e2;hp=82c1e49ccb28534b4e8b77d5f0ff553f19912d4d 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. Signed-off-by: Alexey Dobriyan Cc: Randy Dunlap Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/Documentation/filesystems/seq_file.txt b/Documentation/filesystems/seq_file.txt index 0d15ebc..a1e2e0d 100644 --- a/Documentation/filesystems/seq_file.txt +++ b/Documentation/filesystems/seq_file.txt @@ -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; }