Commit 9ef2db26 authored by Denis V. Lunev's avatar Denis V. Lunev Committed by Linus Torvalds

nfsd: use proc_create to setup de->proc_fops

Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to
main tree.
Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
Cc: Neil Brown <neilb@suse.de>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 59b74351
...@@ -169,6 +169,7 @@ static const struct file_operations exports_operations = { ...@@ -169,6 +169,7 @@ static const struct file_operations exports_operations = {
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = seq_release,
.owner = THIS_MODULE,
}; };
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
...@@ -801,10 +802,9 @@ static int create_proc_exports_entry(void) ...@@ -801,10 +802,9 @@ static int create_proc_exports_entry(void)
entry = proc_mkdir("fs/nfs", NULL); entry = proc_mkdir("fs/nfs", NULL);
if (!entry) if (!entry)
return -ENOMEM; return -ENOMEM;
entry = create_proc_entry("fs/nfs/exports", 0, NULL); entry = proc_create("exports", 0, entry, &exports_operations);
if (!entry) if (!entry)
return -ENOMEM; return -ENOMEM;
entry->proc_fops = &exports_operations;
return 0; return 0;
} }
#else /* CONFIG_PROC_FS */ #else /* CONFIG_PROC_FS */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment