Re: [PATCH 007 of 9] knfsd: Separate out some parts of nfsd_svc, which start nfs servers.
- From: Andrew Morton <akpm@xxxxxxxx>
- Date: Tue, 25 Jul 2006 23:42:02 -0700
On Tue, 25 Jul 2006 11:54:57 +1000
NeilBrown <neilb@xxxxxxx> wrote:
Separate out the code for creating a new service, and for creating
initial sockets.
Some of these new functions will have multiple callers soon.
In which case they shouldn't be inlined, hmm?
+static inline int nfsd_create_serv(void)
+{
+ int err = 0;
+ lock_kernel();
+ if (nfsd_serv) {
+ nfsd_serv->sv_nrthreads++;
+ unlock_kernel();
+ return 0;
+ }
+
+ atomic_set(&nfsd_busy, 0);
+ nfsd_serv = svc_create(&nfsd_program, NFSD_BUFSIZE,
+ nfsd_last_thread);
+ if (nfsd_serv == NULL)
+ err = -ENOMEM;
+ else
+ nfsd_serv->sv_nrthreads++;
+ unlock_kernel();
+ do_gettimeofday(&nfssvc_boot); /* record boot time */
+ return err;
+}
+
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH 000 of 9] knfsd: Introduction
- From: NeilBrown
- [PATCH 007 of 9] knfsd: Separate out some parts of nfsd_svc, which start nfs servers.
- From: NeilBrown
- [PATCH 000 of 9] knfsd: Introduction
- Prev by Date: Re: [patch] lockdep: annotate vfs_rmdir for filesystems that take i_mutex in delete_inode
- Next by Date: [patch] lockdep: annotate vfs_rmdir for filesystems that take i_mutex in delete_inode
- Previous by thread: [PATCH 007 of 9] knfsd: Separate out some parts of nfsd_svc, which start nfs servers.
- Next by thread: Linux 2.6.17.7
- Index(es):
Relevant Pages
|