<div dir="ltr"><div><div><div><div>Hi,<br><br></div>As far as I can see, getnewvnode() always returns 0. However the path to get a new vnode, which is:<br><br>objcache_get() <- sysref_alloc() <- allovnode() <- getnewvnode()<br>
<br></div>may return NULL via objcache_get.<br><br></div>Filesystems like NFS for example use vx_put() on the vnode obtained via getnewvnode() in its nfsnode allocation path. In the case the returned vnode pointer was NULL that would cause a kernel panic.<br>
<br></div>All filesystems check the return code from getnewvnode() but they don't check whether the returned vnode is NULL.<br><br>In any case, I could be missing something; thoughts are appreciated.<br><br>Cheers,<br>
Antonio Huete<br></div>