From patchwork Mon Jan 29 14:57:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goldwyn Rodrigues X-Patchwork-Id: 10189841 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DE0D560388 for ; Mon, 29 Jan 2018 14:58:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D118A23B34 for ; Mon, 29 Jan 2018 14:58:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5D4D28627; Mon, 29 Jan 2018 14:58:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75EDE28613 for ; Mon, 29 Jan 2018 14:58:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751926AbeA2O6B (ORCPT ); Mon, 29 Jan 2018 09:58:01 -0500 Received: from mx2.suse.de ([195.135.220.15]:44320 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751933AbeA2O5x (ORCPT ); Mon, 29 Jan 2018 09:57:53 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 67545ABB4; Mon, 29 Jan 2018 14:57:51 +0000 (UTC) From: Goldwyn Rodrigues To: linux-fsdevel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-xfs@vger.kernel.org, axboe@kernel.dk, ak@linux.intel.com, Goldwyn Rodrigues Subject: [PATCH 2/2] xfs: remove assert to check bytes returned Date: Mon, 29 Jan 2018 08:57:41 -0600 Message-Id: <20180129145741.29486-2-rgoldwyn@suse.de> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180129145741.29486-1-rgoldwyn@suse.de> References: <20180129145741.29486-1-rgoldwyn@suse.de> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Goldwyn Rodrigues Since we can return less than count in case of partial direct writes, remove the ASSERT. Signed-off-by: Goldwyn Rodrigues Acked-by: Dave Chinner Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_file.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 8601275cc5e6..8fc4dbf66910 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -590,12 +590,6 @@ xfs_file_dio_aio_write( ret = iomap_dio_rw(iocb, from, &xfs_iomap_ops, xfs_dio_write_end_io); out: xfs_iunlock(ip, iolock); - - /* - * No fallback to buffered IO on errors for XFS, direct IO will either - * complete fully or fail. - */ - ASSERT(ret < 0 || ret == count); return ret; }