NFSD: Decrease nfsd_users in nfsd_startup_generic fail
authorKinglong Mee <kinglongmee@gmail.com>
Wed, 30 Jul 2014 13:26:05 +0000 (21:26 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Sep 2014 23:34:18 +0000 (16:34 -0700)
commitd29135ddc8f0c3084693d6770c412f3b3b94a1c0
tree29e43cbcdf5dd53079c8139b7080b17c300f96e3
parent323308e6f5ea6e0fa311478581c87b09fa219f9c
NFSD: Decrease nfsd_users in nfsd_startup_generic fail

commit d9499a95716db0d4bc9b67e88fd162133e7d6b08 upstream.

A memory allocation failure could cause nfsd_startup_generic to fail, in
which case nfsd_users wouldn't be incorrectly left elevated.

After nfsd restarts nfsd_startup_generic will then succeed without doing
anything--the first consequence is likely nfs4_start_net finding a bad
laundry_wq and crashing.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Fixes: 4539f14981ce "nfsd: replace boolean nfsd_up flag by users counter"
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfssvc.c