From: Arnd Bergmann Subject: Re: [PATCH 4/7] VFS: Add generic_file_llseek_size Date: Tue, 23 Aug 2011 14:51:56 +0200 Message-ID: <201108231451.56191.arnd@arndb.de> References: <1314046152-2175-1-git-send-email-andi@firstfloor.org> <1314046152-2175-5-git-send-email-andi@firstfloor.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Cc: viro@zeniv.linux.org.uk, hch@infradead.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Kleen To: Andi Kleen Return-path: Received: from moutng.kundenserver.de ([212.227.126.171]:63124 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752890Ab1HWMwK (ORCPT ); Tue, 23 Aug 2011 08:52:10 -0400 In-Reply-To: <1314046152-2175-5-git-send-email-andi@firstfloor.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Monday 22 August 2011, Andi Kleen wrote: > From: Andi Kleen > > Add a generic_file_llseek variant to the VFS that allows passing in > the current file size, instead of always using inode->i_size. > This can be used to eliminate some cut'n'paste seek code in ext4. > > Signed-off-by: Andi Kleen Ah, very nice. I think you can use the same trick to remove duplication in default_llseek by always setting the limit to MAX_LFS_FILESIZE. Arnd