Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp576793ybi; Wed, 3 Jul 2019 01:17:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJcZ2VJTECikH/Z6R7l259ecOUGnMOd6TmrKyZJvC6cMrYOmrXnxsA3YUXJ/kN2kwYAf0p X-Received: by 2002:a65:6454:: with SMTP id s20mr34103236pgv.15.1562141845436; Wed, 03 Jul 2019 01:17:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562141845; cv=none; d=google.com; s=arc-20160816; b=t3PI3dhI6U7kwnVyypoZKWKQqFkymfNBv4gssY64+92XetYIMSm3EI5A7zIDC2UsHI AjNfB+lKQxUn0/igux0JiQrwImoZy6MInA03wlBOK8pJ8XADXERnX+3/b4cjHGHleHXd Tzovi94NUCRK8BWPURUiwvsYszrpFTYix+xU4vIUXMOTph7KId6/0Z2xxtT2t8NJ+PzV BPBqPJeHejHGM9hZiytU+jsUBFYET7PMSHHWXJsjNODDC5efTdt1ESV/54fVI/hvlrPH vNHoD6y+/YLzOvcxjUwFdQ0cvy1e90HoThqwznU4ETDX83C30/eULU3UFV57z/+/QJWv IWWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=jOWLuTX5Ou8xPNstVGBSyqvjX18CMNLeXqk+tck3OIc=; b=dHgdGltYXHp+YF7XlcXiHw2YvOY1URtP/S/6dMCV1/AuB35RXxDmjpq1wpkqo3k4u7 kxfaLlaF75tOHlRNM/NOd0NcVAAmAka5x6fDE9UV6iuorD2cY1VIMN5PhoD67UZhF008 EY0Him2m9qteE0H6cBBceWMOIPctkYctf7lKh8ImeEYbOH8/DU89uTIVUNl0oHZSFsFG nH7ACt0hHLpsrQJLwbMRVzuzOaApOVw1dzhiImnkgAJLQ/BwlKcNl1x8HHzcDc3BhFGt a53+xa+OekScGbu6VzvO+cxoI84UWj45RcseQVBQqDVwByXftop2sC+Vm72tRxcTCZkG pz7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=klhHxOiW; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si1610017pll.347.2019.07.03.01.17.02; Wed, 03 Jul 2019 01:17:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=klhHxOiW; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727052AbfGCIRB (ORCPT + 99 others); Wed, 3 Jul 2019 04:17:01 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:43724 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726670AbfGCIRB (ORCPT ); Wed, 3 Jul 2019 04:17:01 -0400 Received: by mail-pg1-f196.google.com with SMTP id f25so807581pgv.10; Wed, 03 Jul 2019 01:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jOWLuTX5Ou8xPNstVGBSyqvjX18CMNLeXqk+tck3OIc=; b=klhHxOiWT4KNUKOQ9Oah2yuZNp6k2xIklSiHE+F67MTiMu/ynw9r2L/him13p+b+/f P97oWgXmZCWvTpR6u/Ej+LywOxjwdboL5BCnLlUqq/vv/Unp4CvcGS6n0+z9PAzwyecu cMsSGBNxTJOZM2aI0nPS65T4Bw6N/RxRXoC7RggW98XmMWoVpwin4KWlhWwuYDTVx/Io /112NVeXq+fbzE44KVYGiDu7ZJMGC285olVGI2ciYVGTubUgSPV4gpO6SfczfTx+/ASg 48IKedZigT7QFrChtFh04cCl2CAreZUABDv+yi7dSSO7KmwpUiSyy+aQ+H/A17QSO8vL ideg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jOWLuTX5Ou8xPNstVGBSyqvjX18CMNLeXqk+tck3OIc=; b=ilNNGvaIotOPneNAO/PMuz5G71Riut8B+tcpQjGrvNaoz69m8fWdjSDBSZbU94RSZ7 7sH/r0xoNn6c9GEic6Qp7bTzckD4sMLcRW/7+TigvXJEPIFo38eL/yztmXkkSZPEny+F mPQUuv5sNowF0MSsOM8KBndfofWLTZAX9VD9Ke0FPAHFFKvpLWR5+Lr2qfb6XFjndvtS Z/qY8cVR7wOajgIZBjuq4XLq6rJ8Qa77c8qAR5SF/TMS7BzKhdBiAMlnPk/Uf7otk0AD bBU5gzPR/q29ELS0PlY833lJzW2WNUyvPzSrL/NyQPCRL9BeEhu/zSi2+VJqN6GZnOZp gYWQ== X-Gm-Message-State: APjAAAULiW+xD0zBWes0cZLAyl2nEBTspH7qBD1VyJyqPnJCf2r7ZsxD bpYM9sfS2praxj11PgICEWQ= X-Received: by 2002:a17:90a:20c6:: with SMTP id f64mr11315789pjg.57.1562141820942; Wed, 03 Jul 2019 01:17:00 -0700 (PDT) Received: from ssy-OptiPlex-7050.mioffice.cn ([43.224.245.181]) by smtp.gmail.com with ESMTPSA id a4sm1431539pff.9.2019.07.03.01.16.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Jul 2019 01:17:00 -0700 (PDT) From: Shi Siyuan To: tytso@mit.edu, adilger.kernel@dilger.ca Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, shisiyuan Subject: [PATCH] ext4: remove unnecessary error check Date: Wed, 3 Jul 2019 16:16:54 +0800 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: shisiyuan Remove unnecessary error check in ext4_file_write_iter(), because this check will be done in upcoming later function -- ext4_write_checks() -> generic_write_checks() Change-Id: I7b0ab27f693a50765c15b5eaa3f4e7c38f42e01e Signed-off-by: shisiyuan --- fs/ext4/file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 5cb9aa3..9e4c39e 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -224,8 +224,6 @@ ext4_file_write_iter(struct kiocb *iocb, struct iov_iter *from) if (IS_DAX(inode)) return ext4_dax_write_iter(iocb, from); #endif - if (!o_direct && (iocb->ki_flags & IOCB_NOWAIT)) - return -EOPNOTSUPP; if (!inode_trylock(inode)) { if (iocb->ki_flags & IOCB_NOWAIT) -- 2.7.4