[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v3 14/23] lib/vfscore: keep vnode locked during drele call
Hello Yuri, Please find the comment inline Thanks & Regards Sharan On 2/7/19 2:58 PM, Yuri Volchkov wrote: Why are we changing order of unlocking and releasing the dentry on the lookup and not when the entry allocation fails in the statement below it. A comment explaining the reason should helpSigned-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx> --- lib/vfscore/lookup.c | 2 +- lib/vfscore/syscalls.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vfscore/lookup.c b/lib/vfscore/lookup.c index 1e2c4005..cbc02b52 100644 --- a/lib/vfscore/lookup.c +++ b/lib/vfscore/lookup.c @@ -181,8 +181,8 @@ namei(const char *path, struct dentry **dpp) /* Find a vnode in this directory. */ error = VOP_LOOKUP(dvp, name, &vp); if (error) { - vn_unlock(dvp); drele(ddp); + vn_unlock(dvp); If the VOP_CREATE has to maintain this order releasing the parent directory entry, shouldn't VOP_REMOVE operation also follow a similar pattern?return error; }diff --git a/lib/vfscore/syscalls.c b/lib/vfscore/syscalls.cindex fa0498e7..33004960 100644 --- a/lib/vfscore/syscalls.c +++ b/lib/vfscore/syscalls.c @@ -132,8 +132,8 @@ sys_open(char *path, int flags, mode_t mode, struct vfscore_file **fpp) mode &= ~S_IFMT; mode |= S_IFREG; error = VOP_CREATE(ddp->d_vnode, filename, mode); - vn_unlock(ddp->d_vnode); drele(ddp); + vn_unlock(ddp->d_vnode); if (error)return error; _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |