nfs: Fix panic occurs when creating a file

Fix an issue #5496 where panic occurs when creating a file with nfs v2
due to the newly generated vnode of the file is not published
and is still busy.

Change-Id: I490a10d4c7de6c87e309a21da575d6cc1a521974
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3436
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Mitsunori YOSHIDA
2020-12-01 07:23:55 +00:00
committed by Adrien Destugues
parent cb26d04e81
commit bca2f73564
@@ -1854,8 +1854,8 @@ fs_create(fs_volume *_volume, fs_vnode *_dir, const char *name, int omode,
(*cookie)->original_size = st.st_size;
(*cookie)->st = st;
result = new_vnode(_volume, *vnid, newNode, &sNFSVnodeOps);
result = publish_vnode(_volume, *vnid, newNode, &sNFSVnodeOps,
S_IFREG, 0);
if (result < B_OK) {
XDRInPacketDestroy(&reply);
XDROutPacketDestroy(&call);