From owner-cvs-all@FreeBSD.ORG Sun May 25 18:28:44 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F2351065674; Sun, 25 May 2008 18:28:44 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-3.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.freebsd.org (Postfix) with ESMTP id 12A0A8FC13; Sun, 25 May 2008 18:28:43 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from [129.247.12.14] ([129.247.12.14]) by smtp-3.dlr.de with Microsoft SMTPSVC(6.0.3790.1830); Sun, 25 May 2008 20:15:26 +0200 Message-ID: <4839ACBD.9010706@dlr.de> Date: Sun, 25 May 2008 20:15:25 +0200 From: Hartmut Brandt Organization: German Aerospace Center User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Roman Divacky References: <200805241451.m4OEpU1r053111@repoman.freebsd.org> <20080525172926.GA12033@freebsd.org> In-Reply-To: <20080525172926.GA12033@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 25 May 2008 18:15:26.0991 (UTC) FILETIME=[4EB369F0:01C8BE93] Cc: cvs-src@FreeBSD.org, Ulf Lilleengen , src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/fs/fdescfs fdesc.h fdesc_vfsops.c fdesc_vnops.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2008 18:28:44 -0000 Roman Divacky wrote: > On Sat, May 24, 2008 at 02:51:30PM +0000, Ulf Lilleengen wrote: >> lulf 2008-05-24 14:51:30 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/fs/fdescfs fdesc.h fdesc_vfsops.c fdesc_vnops.c >> Log: >> - Add locking to all filesystem operations in fdescfs and flag it as MPSAFE. >> - Use proper synhronization primitives to protect the internal fdesc node cache >> used in fdescfs. >> - Properly initialize and uninitalize hash. >> - Remove unused functions. >> >> Since fdescfs might recurse on itself, adding proper locking to it needed some >> tricky workarounds in some parts to make it work. For instance, a descriptor in >> fdescfs could refer to an open descriptor to itself, thus forcing the thread to >> recurse on vnode locks. Because of this, other race conditions also had to be >> fixed. >> >> Tested by: pho >> Reviewed by: kib (mentor) >> Approved by: kib (mentor) > > + LIST_FOREACH(fd2, fc, fd_hash) { > + if (fd == fd2) { > + LIST_REMOVE(fd, fd_hash); > + break; > + } > + } > > shouldn't you use LIST_FOREACH_SAFE here? Only of you continue going through the list. harti