nfsd: initialize i_private before d_add
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 15 Aug 2019 20:18:26 +0000 (16:18 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 15 Aug 2019 20:24:07 +0000 (16:24 -0400)
commitbebd6997163addc1938db8c61754a23ffdf8ccc4
treeede74ed1ac2d974bc81c8cea70bbc2c38bd04694
parentdc46bba709cfb45e4b2d40cf45aaeacb82690504
nfsd: initialize i_private before d_add

A process could race in an open and attempt to read one of these files
before i_private is initialized, and get a spurious error.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfsctl.c