aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 7b3e5c367f5b..ecebb406cc1a 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1192,8 +1192,6 @@ void nfs_clients_init(struct net *net)
1192} 1192}
1193 1193
1194#ifdef CONFIG_PROC_FS 1194#ifdef CONFIG_PROC_FS
1195static struct proc_dir_entry *proc_fs_nfs;
1196
1197static int nfs_server_list_open(struct inode *inode, struct file *file); 1195static int nfs_server_list_open(struct inode *inode, struct file *file);
1198static void *nfs_server_list_start(struct seq_file *p, loff_t *pos); 1196static void *nfs_server_list_start(struct seq_file *p, loff_t *pos);
1199static void *nfs_server_list_next(struct seq_file *p, void *v, loff_t *pos); 1197static void *nfs_server_list_next(struct seq_file *p, void *v, loff_t *pos);
@@ -1435,27 +1433,20 @@ void nfs_fs_proc_net_exit(struct net *net)
1435 */ 1433 */
1436int __init nfs_fs_proc_init(void) 1434int __init nfs_fs_proc_init(void)
1437{ 1435{
1438 struct proc_dir_entry *p; 1436 if (!proc_mkdir("fs/nfsfs", NULL))
1439
1440 proc_fs_nfs = proc_mkdir("fs/nfsfs", NULL);
1441 if (!proc_fs_nfs)
1442 goto error_0; 1437 goto error_0;
1443 1438
1444 /* a file of servers with which we're dealing */ 1439 /* a file of servers with which we're dealing */
1445 p = proc_symlink("servers", proc_fs_nfs, "../../net/nfsfs/servers"); 1440 if (!proc_symlink("fs/nfsfs/servers", NULL, "../../net/nfsfs/servers"))
1446 if (!p)
1447 goto error_1; 1441 goto error_1;
1448 1442
1449 /* a file of volumes that we have mounted */ 1443 /* a file of volumes that we have mounted */
1450 p = proc_symlink("volumes", proc_fs_nfs, "../../net/nfsfs/volumes"); 1444 if (!proc_symlink("fs/nfsfs/volumes", NULL, "../../net/nfsfs/volumes"))
1451 if (!p) 1445 goto error_1;
1452 goto error_2;
1453 return 0;
1454 1446
1455error_2: 1447 return 0;
1456 remove_proc_entry("servers", proc_fs_nfs);
1457error_1: 1448error_1:
1458 remove_proc_entry("fs/nfsfs", NULL); 1449 remove_proc_subtree("fs/nfsfs", NULL);
1459error_0: 1450error_0:
1460 return -ENOMEM; 1451 return -ENOMEM;
1461} 1452}
@@ -1465,9 +1456,7 @@ error_0:
1465 */ 1456 */
1466void nfs_fs_proc_exit(void) 1457void nfs_fs_proc_exit(void)
1467{ 1458{
1468 remove_proc_entry("volumes", proc_fs_nfs); 1459 remove_proc_subtree("fs/nfsfs", NULL);
1469 remove_proc_entry("servers", proc_fs_nfs);
1470 remove_proc_entry("fs/nfsfs", NULL);
1471} 1460}
1472 1461
1473#endif /* CONFIG_PROC_FS */ 1462#endif /* CONFIG_PROC_FS */