[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [UNIKRAFT PATCH 2/5] lib/vfscore: Add missing error value



Hi Vlad, looks good, thanks.

Reviewed-by: Felipe Huici <felipe.huici@xxxxxxxxx>

On Sat, Nov 21, 2020 at 4:08 PM Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxx> wrote:
When mp->m_root is null we set no error. We solve
this by setting error equal to ENOMEM;
---
 lib/vfscore/mount.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/vfscore/mount.c b/lib/vfscore/mount.c
index 1a778be2..a6df9983 100644
--- a/lib/vfscore/mount.c
+++ b/lib/vfscore/mount.c
@@ -207,6 +207,7 @@ mount(const char *dev, const char *dir, const char *fsname, unsigned long flags,

        mp->m_root = dentry_alloc(NULL, vp, "/");
        if (!mp->m_root) {
+               error = ENOMEM;
                vput(vp);
                goto err3;
        }
--
2.27.0



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.