aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfsctl.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-29 04:02:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:20 -0400
commit9ef2db2630652d68dfd336088648adae7ef0bcd4 (patch)
treec49fdc3e89f1a438d4d379492f75ca689662cdac /fs/nfsd/nfsctl.c
parent59b7435149eab2dd06dd678742faff6049cb655f (diff)
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: Denis 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfsd/nfsctl.c')
-rw-r--r--fs/nfsd/nfsctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 42f3820ee8f5..5ac00c4fee91 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -169,6 +169,7 @@ static const struct file_operations exports_operations = {
169 .read = seq_read, 169 .read = seq_read,
170 .llseek = seq_lseek, 170 .llseek = seq_lseek,
171 .release = seq_release, 171 .release = seq_release,
172 .owner = THIS_MODULE,
172}; 173};
173 174
174/*----------------------------------------------------------------------------*/ 175/*----------------------------------------------------------------------------*/
@@ -801,10 +802,9 @@ static int create_proc_exports_entry(void)
801 entry = proc_mkdir("fs/nfs", NULL); 802 entry = proc_mkdir("fs/nfs", NULL);
802 if (!entry) 803 if (!entry)
803 return -ENOMEM; 804 return -ENOMEM;
804 entry = create_proc_entry("fs/nfs/exports", 0, NULL); 805 entry = proc_create("exports", 0, entry, &exports_operations);
805 if (!entry) 806 if (!entry)
806 return -ENOMEM; 807 return -ENOMEM;
807 entry->proc_fops = &exports_operations;
808 return 0; 808 return 0;
809} 809}
810#else /* CONFIG_PROC_FS */ 810#else /* CONFIG_PROC_FS */