From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 1/2] fs: remove duplicated iovec checking code v8 Date: Mon, 19 Mar 2007 09:28:28 +0000 Message-ID: <20070319092828.GA3364@infradead.org> References: <87slc18yhe.fsf@sw.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, xfs@oss.sgi.com, devel@openvz.org To: Dmitriy Monakhov Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:48209 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753307AbXCSJ2a (ORCPT ); Mon, 19 Mar 2007 05:28:30 -0400 Content-Disposition: inline In-Reply-To: <87slc18yhe.fsf@sw.ru> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Mar 19, 2007 at 10:49:01AM +0300, Dmitriy Monakhov wrote: > > Where are several places where the same code used for iovec checks. > This patch just move this code to separate helper function, and replace > duplicated code with it. IMHO it is better because these are checks that > we want for all filesystems/drivers that use vectored I/O. Please move this into the common code path, so it's checked before entering the filesystem. This won't cover the calculating count until we have an iodesc/uio strcuture to pass it down, so feel free to add a tiny helper for that temporaily.