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: I4482fbe046e000eb799599fdeaab39b7812bd2ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3447
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Diff
src/add-ons/kernel/file_systems/nfs/nfs_add_on.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -1854,8 +1854,8 @@
(*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);