kernel-hacking-2024-linux-s.../fs/nfsd
Jeff Layton 78a8d7c8ca nfsd: fix error handling when starting nfsd with rpcbind down
The refcounting for nfsd is a little goofy. What happens is that we
create the nfsd RPC service, attach sockets to it but don't actually
start the threads until someone writes to the "threads" procfile. To do
this, __write_ports_addfd will create the nfsd service and then will
decrement the refcount when exiting but won't actually destroy the
service.

This is fine when there aren't errors, but when there are this can
cause later attempts to start nfsd to fail. nfsd_serv will be set,
and that causes __write_versions to return EBUSY.

Fix this by calling svc_destroy on nfsd_serv when this function is
going to return error.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2010-07-23 08:51:23 -04:00
..
auth.c nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
auth.h
cache.h nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
export.c Merge commit 'v2.6.34-rc6' 2010-05-04 11:29:05 -04:00
Kconfig
lockd.c nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
Makefile
nfs2acl.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nfs3acl.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nfs3proc.c NFSD: Fill in WCC data for REMOVE, RMDIR, MKNOD, and MKDIR 2010-07-07 17:12:32 -04:00
nfs3xdr.c nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
nfs4acl.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nfs4callback.c nfsd4: fix delegation recall race use-after-free 2010-06-24 12:24:55 -04:00
nfs4idmap.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nfs4proc.c nfsd4: implement reclaim_complete 2010-05-13 12:03:11 -04:00
nfs4recover.c sanitize vfs_fsync calling conventions 2010-05-21 18:31:21 -04:00
nfs4state.c nfsd4: fix v4 state shutdown error paths 2010-07-23 08:51:22 -04:00
nfs4xdr.c nfsd4; fix session reference count leak 2010-06-22 17:19:28 -04:00
nfscache.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nfsctl.c nfsd: fix error handling when starting nfsd with rpcbind down 2010-07-23 08:51:23 -04:00
nfsd.h nfsd4: allow setting grace period time 2010-03-06 15:02:08 -05:00
nfsfh.c nfsd: fix "insecure" export option 2009-12-20 20:19:51 -08:00
nfsfh.h nfsd: move most of nfsfh.h to fs/nfsd 2009-12-15 15:01:46 -05:00
nfsproc.c nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
nfssvc.c nfsd4: fix v4 state shutdown error paths 2010-07-23 08:51:22 -04:00
nfsxdr.c nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
state.h nfsd4: keep a reference count on client while in use 2010-05-13 11:58:54 -04:00
stats.c nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
vfs.c nfsd: remove unused assignment from nfsd_link 2010-07-23 08:50:39 -04:00
vfs.h nfsd: don't break lease while servicing a COMMIT 2010-03-22 15:37:53 -04:00
xdr.h nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
xdr3.h nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
xdr4.h nfsd4: implement reclaim_complete 2010-05-13 12:03:11 -04:00