@@ -1067,7 +1067,6 @@ void nfs_clients_init(struct net *net)
10671067}
10681068
10691069#ifdef CONFIG_PROC_FS
1070- static int nfs_server_list_open (struct inode * inode , struct file * file );
10711070static void * nfs_server_list_start (struct seq_file * p , loff_t * pos );
10721071static void * nfs_server_list_next (struct seq_file * p , void * v , loff_t * pos );
10731072static void nfs_server_list_stop (struct seq_file * p , void * v );
@@ -1080,14 +1079,6 @@ static const struct seq_operations nfs_server_list_ops = {
10801079 .show = nfs_server_list_show ,
10811080};
10821081
1083- static const struct file_operations nfs_server_list_fops = {
1084- .open = nfs_server_list_open ,
1085- .read = seq_read ,
1086- .llseek = seq_lseek ,
1087- .release = seq_release_net ,
1088- };
1089-
1090- static int nfs_volume_list_open (struct inode * inode , struct file * file );
10911082static void * nfs_volume_list_start (struct seq_file * p , loff_t * pos );
10921083static void * nfs_volume_list_next (struct seq_file * p , void * v , loff_t * pos );
10931084static void nfs_volume_list_stop (struct seq_file * p , void * v );
@@ -1100,23 +1091,6 @@ static const struct seq_operations nfs_volume_list_ops = {
11001091 .show = nfs_volume_list_show ,
11011092};
11021093
1103- static const struct file_operations nfs_volume_list_fops = {
1104- .open = nfs_volume_list_open ,
1105- .read = seq_read ,
1106- .llseek = seq_lseek ,
1107- .release = seq_release_net ,
1108- };
1109-
1110- /*
1111- * open "/proc/fs/nfsfs/servers" which provides a summary of servers with which
1112- * we're dealing
1113- */
1114- static int nfs_server_list_open (struct inode * inode , struct file * file )
1115- {
1116- return seq_open_net (inode , file , & nfs_server_list_ops ,
1117- sizeof (struct seq_net_private ));
1118- }
1119-
11201094/*
11211095 * set up the iterator to start reading from the server list and return the first item
11221096 */
@@ -1184,15 +1158,6 @@ static int nfs_server_list_show(struct seq_file *m, void *v)
11841158 return 0 ;
11851159}
11861160
1187- /*
1188- * open "/proc/fs/nfsfs/volumes" which provides a summary of extant volumes
1189- */
1190- static int nfs_volume_list_open (struct inode * inode , struct file * file )
1191- {
1192- return seq_open_net (inode , file , & nfs_volume_list_ops ,
1193- sizeof (struct seq_net_private ));
1194- }
1195-
11961161/*
11971162 * set up the iterator to start reading from the volume list and return the first item
11981163 */
@@ -1278,14 +1243,14 @@ int nfs_fs_proc_net_init(struct net *net)
12781243 goto error_0 ;
12791244
12801245 /* a file of servers with which we're dealing */
1281- p = proc_create ("servers" , S_IFREG |S_IRUGO ,
1282- nn -> proc_nfsfs , & nfs_server_list_fops );
1246+ p = proc_create_net ("servers" , S_IFREG |S_IRUGO , nn -> proc_nfsfs ,
1247+ & nfs_server_list_ops , sizeof ( struct seq_net_private ) );
12831248 if (!p )
12841249 goto error_1 ;
12851250
12861251 /* a file of volumes that we have mounted */
1287- p = proc_create ("volumes" , S_IFREG |S_IRUGO ,
1288- nn -> proc_nfsfs , & nfs_volume_list_fops );
1252+ p = proc_create_net ("volumes" , S_IFREG |S_IRUGO , nn -> proc_nfsfs ,
1253+ & nfs_volume_list_ops , sizeof ( struct seq_net_private ) );
12891254 if (!p )
12901255 goto error_1 ;
12911256 return 0 ;
0 commit comments