File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -1494,7 +1494,17 @@ static int create_proc_exports_entry(void)
1494
1494
1495
1495
unsigned int nfsd_net_id ;
1496
1496
1497
- static __net_init int nfsd_init_net (struct net * net )
1497
+ /**
1498
+ * nfsd_net_init - Prepare the nfsd_net portion of a new net namespace
1499
+ * @net: a freshly-created network namespace
1500
+ *
1501
+ * This information stays around as long as the network namespace is
1502
+ * alive whether or not there is an NFSD instance running in the
1503
+ * namespace.
1504
+ *
1505
+ * Returns zero on success, or a negative errno otherwise.
1506
+ */
1507
+ static __net_init int nfsd_net_init (struct net * net )
1498
1508
{
1499
1509
int retval ;
1500
1510
struct nfsd_net * nn = net_generic (net , nfsd_net_id );
@@ -1524,7 +1534,12 @@ static __net_init int nfsd_init_net(struct net *net)
1524
1534
return retval ;
1525
1535
}
1526
1536
1527
- static __net_exit void nfsd_exit_net (struct net * net )
1537
+ /**
1538
+ * nfsd_net_exit - Release the nfsd_net portion of a net namespace
1539
+ * @net: a network namespace that is about to be destroyed
1540
+ *
1541
+ */
1542
+ static __net_exit void nfsd_net_exit (struct net * net )
1528
1543
{
1529
1544
struct nfsd_net * nn = net_generic (net , nfsd_net_id );
1530
1545
@@ -1535,8 +1550,8 @@ static __net_exit void nfsd_exit_net(struct net *net)
1535
1550
}
1536
1551
1537
1552
static struct pernet_operations nfsd_net_ops = {
1538
- .init = nfsd_init_net ,
1539
- .exit = nfsd_exit_net ,
1553
+ .init = nfsd_net_init ,
1554
+ .exit = nfsd_net_exit ,
1540
1555
.id = & nfsd_net_id ,
1541
1556
.size = sizeof (struct nfsd_net ),
1542
1557
};
Original file line number Diff line number Diff line change @@ -402,6 +402,11 @@ void nfsd_reset_write_verifier(struct nfsd_net *nn)
402
402
write_sequnlock (& nn -> writeverf_lock );
403
403
}
404
404
405
+ /*
406
+ * Crank up a set of per-namespace resources for a new NFSD instance,
407
+ * including lockd, a duplicate reply cache, an open file cache
408
+ * instance, and a cache of NFSv4 state objects.
409
+ */
405
410
static int nfsd_startup_net (struct net * net , const struct cred * cred )
406
411
{
407
412
struct nfsd_net * nn = net_generic (net , nfsd_net_id );
You can’t perform that action at this time.
0 commit comments