From: Thomas Veerman Date: Mon, 20 Feb 2012 09:10:58 +0000 (+0000) Subject: VFS: remove erroneous assert X-Git-Tag: v3.2.1~708 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doc/zpipe.c?a=commitdiff_plain;h=230ea1ce13e04ee588e6edfe5940b1c4da7ab158;p=minix.git VFS: remove erroneous assert The assert was meant as an additional check to the assert in link.c:198. The reasoning behind the assert in link.c:198 is that once you've obtained a write lock on a vmnt, you can't get an additional read lock on the same vmnt. However, that does not always hold for the assert in path.c:281 where the situation could be that you've obtained a read lock and managed to get another read lock (this is possible). In other words, the assert in path.c:281 is not the right place to check for that situation. --- diff --git a/servers/vfs/path.c b/servers/vfs/path.c index a6945458f..8fb047dc1 100644 --- a/servers/vfs/path.c +++ b/servers/vfs/path.c @@ -271,16 +271,6 @@ struct fproc *rfp; symlink.l_vmnt_lock = VMNT_READ; sym_vp = advance(res_vp, &symlink, rfp); - /* Advance caused us to either switch to a different vmnt or we're - * still at the same vmnt. The former might've yielded a new vmnt lock, - * the latter should not have. Verify. */ - if (sym_vmp != NULL) { - /* We got a vmnt lock, so the endpoints of the vnodes must - * differ. - */ - assert(sym_vp->v_fs_e != res_vp->v_fs_e); - } - if (sym_vp != NULL && S_ISLNK(sym_vp->v_mode)) { /* Last component is a symlink, but if we've been asked to not * resolve it, return now.