Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757091AbZFVSPz (ORCPT ); Mon, 22 Jun 2009 14:15:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752930AbZFVSPs (ORCPT ); Mon, 22 Jun 2009 14:15:48 -0400 Received: from smtp-out.google.com ([216.239.33.17]:30013 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752644AbZFVSPr (ORCPT ); Mon, 22 Jun 2009 14:15:47 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:date:message-id:subject:from:to:content-type: content-transfer-encoding:x-system-of-record; b=gNOMhzBCuQ1Nx12BOcT2ljIdwxCWNqZ5IAYdP2gwj3SJayOez2inCPsaWcCm40u9T yNU9M04HTGNwnMvXnx/PA== MIME-Version: 1.0 Date: Mon, 22 Jun 2009 14:15:36 -0400 Message-ID: <21c5ff280906221115v302d8b95t4a4ae2df86289056@mail.gmail.com> Subject: [patch] small sendfile fixes From: Robert Love To: lkml , Al Viro Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1113 Lines: 27 Three fixes for sendfile, mostly related to sending large files from pseudo filesystems: - Fix sendfile for offsets > 300G. This can happen with pseudo filesystems. This happens because the overflow check is using inode->i_sb->s_maxbytes and not the superblock of the backing device's s_maxbytes. For a regular file these are interchangible but for a special file these are different and you want the latter. - Don't compare against the max of the out_inode's superblock. Doesn't make sense. - For pseudo and other filesystems with s_maxbytes set to ~0ULL, max ends up holding a negative number as it is signed. Check for and correct that. Git patch is against 2.6.30. I'd like Al to take a look and make sure my logic is right before applying. Robert From: Mandeep Singh Baines Signed-off-by: Robert Love -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/