1 From dd838821f0a29781b185cd8fb8e48d5c177bd838 Mon Sep 17 00:00:00 2001
2 From: Yihao Wu <wuyihao@linux.alibaba.com>
3 Date: Wed, 6 Mar 2019 21:03:50 +0800
4 Subject: nfsd: fix wrong check in write_v4_end_grace()
6 From: Yihao Wu <wuyihao@linux.alibaba.com>
8 commit dd838821f0a29781b185cd8fb8e48d5c177bd838 upstream.
10 Commit 62a063b8e7d1 "nfsd4: fix crash on writing v4_end_grace before
11 nfsd startup" is trying to fix a NULL dereference issue, but it
12 mistakenly checks if the nfsd server is started. So fix it.
14 Fixes: 62a063b8e7d1 "nfsd4: fix crash on writing v4_end_grace before nfsd startup"
15 Cc: stable@vger.kernel.org
16 Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
17 Signed-off-by: Yihao Wu <wuyihao@linux.alibaba.com>
18 Signed-off-by: J. Bruce Fields <bfields@redhat.com>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 fs/nfsd/nfsctl.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
25 --- a/fs/nfsd/nfsctl.c
26 +++ b/fs/nfsd/nfsctl.c
27 @@ -1126,7 +1126,7 @@ static ssize_t write_v4_end_grace(struct