From patchwork Tue May 27 15:38:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 353022 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D79FF1400E0 for ; Wed, 28 May 2014 01:38:23 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753356AbaE0PiR (ORCPT ); Tue, 27 May 2014 11:38:17 -0400 Received: from imap.thunk.org ([74.207.234.97]:35007 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752802AbaE0PiP (ORCPT ); Tue, 27 May 2014 11:38:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=5U0GSr3RdIHeZ7TvWd7EXVnROFZSPcrVTAzyl0XfrvA=; b=fB6xNyEMws4xv7N6FhbpcxQd+jez8udcdsgDrY4En+ZdEYuUlSI8fE80nS0nrr2SLWQrOQ5tRZd00nYVerhg2lk+HYSqJw5+an9m06ddzaa+bZoGfNTKSZBhP+CCx2nvnPFIX3FPhtnTtbcvPTTxOGdNoxumuLl9TzH04nQx2hE=; Received: from root (helo=closure.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.80) (envelope-from ) id 1WpJS6-0001xc-HS; Tue, 27 May 2014 15:38:10 +0000 Received: by closure.thunk.org (Postfix, from userid 15806) id 78D025804D1; Tue, 27 May 2014 11:38:08 -0400 (EDT) Date: Tue, 27 May 2014 11:38:08 -0400 From: Theodore Ts'o To: Dan Carpenter Cc: Namjae Jeon , linux-ext4@vger.kernel.org Subject: Re: ext4: serialize unaligned asynchronous DIO Message-ID: <20140527153808.GA1158@thunk.org> References: <20140527141708.GA2842@mwanda> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140527141708.GA2842@mwanda> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, May 27, 2014 at 05:17:08PM +0300, Dan Carpenter wrote: > Hello Namjae Jeon, > > The patch 00532604c72e: "ext4: introduce new i_write_mutex to protect > fallocate" from May 26, 2014, leads to the following static checker > warning: Thanks, already fixed with the following incremental patch. - Ted --- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 8c39305..e5cd87f 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -135,8 +135,8 @@ ext4_file_write(struct kiocb *iocb, const struct iovec *iov, if ((pos > sbi->s_bitmap_maxbytes) || (pos == sbi->s_bitmap_maxbytes && length > 0)) { mutex_unlock(&inode->i_mutex); - ret = -EFBIG; - goto errout; + mutex_unlock(&EXT4_I(inode)->i_write_mutex); + return -EFBIG; } if (pos + length > sbi->s_bitmap_maxbytes) { @@ -196,7 +196,6 @@ ext4_file_write(struct kiocb *iocb, const struct iovec *iov, if (o_direct) blk_finish_plug(&plug); -errout: if (unaligned_direct_aio) mutex_unlock(&EXT4_I(inode)->i_write_mutex); return ret;