From: Denis V. Lunev Date: Tue, 29 Apr 2008 08:02:04 +0000 (-0700) Subject: nfsd: use proc_create to setup de->proc_fops X-Git-Tag: Ubuntu-5.2.0-15.16~36213 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=9ef2db2630652d68dfd336088648adae7ef0bcd4;p=mirror_ubuntu-eoan-kernel.git 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 Cc: Neil Brown Cc: "J. Bruce Fields" Cc: Alexey Dobriyan Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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 = { .read = seq_read, .llseek = seq_lseek, .release = seq_release, + .owner = THIS_MODULE, }; /*----------------------------------------------------------------------------*/ @@ -801,10 +802,9 @@ static int create_proc_exports_entry(void) entry = proc_mkdir("fs/nfs", NULL); if (!entry) return -ENOMEM; - entry = create_proc_entry("fs/nfs/exports", 0, NULL); + entry = proc_create("exports", 0, entry, &exports_operations); if (!entry) return -ENOMEM; - entry->proc_fops = &exports_operations; return 0; } #else /* CONFIG_PROC_FS */