From patchwork Wed Mar 3 18:55:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jim owens X-Patchwork-Id: 83414 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o23IteH4003697 for ; Wed, 3 Mar 2010 18:55:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752597Ab0CCSza (ORCPT ); Wed, 3 Mar 2010 13:55:30 -0500 Received: from mail-iw0-f182.google.com ([209.85.223.182]:33638 "EHLO mail-iw0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752454Ab0CCSz1 (ORCPT ); Wed, 3 Mar 2010 13:55:27 -0500 Received: by mail-iw0-f182.google.com with SMTP id 12so1488185iwn.21 for ; Wed, 03 Mar 2010 10:55:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=bZPQM6xRfPCLMW0wa06ccjifTop51LUpCD40u1NBtUA=; b=mwz0bfTgn2JQ3S/uxEcvwAfgEFMoN281SltO+wHQr1mZUd/qi1CJ6aARTZEi9SftgD 7MhU/GlT0T6lNnttNZbjWO7d1/GjZdckkkelbJa1Gr07qhwsOH3w85phsxOrxardl312 2/GNaCm+nqP5kRpoxIPThPHTEE1rtQI7ntU1E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=p23ZrFiozMOOR+mBilokdhC6tmeFyzabjwk8W7UAjAfPOim+x85hdPyFskbe3mniil T2fkJOWE+Btw6k9b9MffsNCYs4UD6jRnxrVca/ROl32aUADWVLWhfQ28U0NrwblpKwit tTOUxtCoE0uSu/PtWjIsebDnjwBhZGZx5vmQE= Received: by 10.231.145.74 with SMTP id c10mr210927ibv.51.1267642527377; Wed, 03 Mar 2010 10:55:27 -0800 (PST) Received: from ?192.168.0.99? (c-24-147-40-65.hsd1.nh.comcast.net [24.147.40.65]) by mx.google.com with ESMTPS id e14sm577589ibl.0.2010.03.03.10.55.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Mar 2010 10:55:26 -0800 (PST) Message-ID: <4B8EB09C.6050501@gmail.com> Date: Wed, 03 Mar 2010 13:55:24 -0500 From: jim owens User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: linux-btrfs Subject: [PATCH dio.c V2 6/6] Btrfs: fix goto fail mistakes in btrfs_dio_read. Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 03 Mar 2010 18:55:41 +0000 (UTC) diff --git a/fs/btrfs/dio.c b/fs/btrfs/dio.c index 05a7445..b1beafc 100644 --- a/fs/btrfs/dio.c +++ b/fs/btrfs/dio.c @@ -459,7 +459,7 @@ getlock: end = data_len; if (end <= diocb->start) { mutex_unlock(&diocb->inode->i_mutex); - goto fail; /* 0 is returned past EOF */ + return; /* 0 is returned past EOF */ } if (!loop) { loop++; @@ -489,10 +489,7 @@ getlock: "extent start %llu len %llu\n", diocb->inode->i_ino, diocb->start, len); err = -EIO; - goto fail; - } - - if (em->block_start == EXTENT_MAP_INLINE) { + } else if (em->block_start == EXTENT_MAP_INLINE) { /* ugly stuff because inline can exist in a large file * with other extents if a hole immediately follows. * the inline might end short of the btrfs block with