From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [patch 01/11] fs: new truncate helpers Date: Wed, 26 Aug 2009 10:38:11 +0300 Message-ID: <4A94E663.90705@gmail.com> References: <20090820163504.131529718@suse.de> <20090820164050.401703779@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, Christoph Hellwig To: npiggin@suse.de Return-path: Received: from smtp.nokia.com ([192.100.122.230]:39611 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932357AbZHZHix (ORCPT ); Wed, 26 Aug 2009 03:38:53 -0400 In-Reply-To: <20090820164050.401703779@suse.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi, On 08/20/2009 07:35 PM, npiggin@suse.de wrote: > +/** > + * inode_newsize_ok - may this inode be truncated to a given size > + * @inode: the inode to be truncated > + * @offset: the new size to assign to the inode > + * @Returns: 0 on success, -ve errno on failure > + * > + * inode_newsize_ok will check filesystem limits and ulimits to chec= k that the > + * new inode size is within limits. inode_newsize_ok will also send = SIGXFSZ > + * when necessary. Caller must not proceed with inode size change if= failure is > + * returned. @inode must be a file (not directory), with appropriate > + * permissions to allow truncate (inode_newsize_ok does NOT check th= ese > + * conditions). > + * > + * inode_newsize_ok must be called with i_mutex held. > + */ > +int inode_newsize_ok(struct inode *inode, loff_t offset) > +{ Could you use 'const' for inode here? --=20 Best Regards, Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E= =D1=86=D0=BA=D0=B8=D0=B9) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html