Date: Sun, 1 Dec 2002 16:59:17 -0800 (PST) From: Nate Lawson <nate@root.org> To: Yar Tikhiy <yar@freebsd.org> Cc: freebsd-scsi@freebsd.org Subject: Re: {da,sa,...}open bug? Message-ID: <Pine.BSF.4.21.0212011657400.1744-100000@root.org> In-Reply-To: <20021129223817.D34288@comp.chem.msu.su>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 29 Nov 2002, Yar Tikhiy wrote: > On Mon, Nov 25, 2002 at 12:10:14PM -0800, Nate Lawson wrote: > > On Mon, 25 Nov 2002, Yar Tikhiy wrote: > > > > > While preparing the fix, I noticed an additional couple of oddities. > > > First, files under sys/cam/scsi are inconsistent as to the order of > > > calling cam_periph_release() and cam_periph_unlock(): Some of them > > > will call cam_periph_release() first, and the others will call it second. > > > Then, there's a number of places in the code where cam_periph_unlock() > > > won't be called before return on a cam_periph_acquire() error, though > > > the "periph" has been locked. > > > > I think this should be fixed. Please submit a patch for this. > > Here it is. It a) reorders unlock()'s and release()'s where > necessary, b) adds missing unlock()'s, and finally c) changes > "return(error)" to "return(0)" where "error" will be always 0. > The latter is essentially a style fix, but it is important > WRT the discussed necessity to release a peripheral on errors. > Having no "if (error) cam_periph_release(periph)" before such > returns would be confusing. > > To Nate: If the patch looks good to you, please just say OK, and > I'll do the dirty work of obtaining the high approval and committing. patch looks good to me. pls run past ken@ to get a 2nd opinion and re@ for commit approval. mfc after 1 week. -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0212011657400.1744-100000>