Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6137715rwd; Mon, 19 Jun 2023 02:58:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6m0o/uUORjqpERVBaxNDdz3NaK+rcWto6AtGHQDlyMBQ7oCTXsbi9ZpaZt2SBZnlnauh20 X-Received: by 2002:a05:6808:13cd:b0:398:f48:eb4 with SMTP id d13-20020a05680813cd00b003980f480eb4mr8115616oiw.36.1687168728747; Mon, 19 Jun 2023 02:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687168728; cv=none; d=google.com; s=arc-20160816; b=nLWxU526Ey9yGiNxltMS8R24YsLa/UKbpFfp3RwJUy8R67g9Lux6x6Y+ts4hWNlbMR tdieKhkHR2029+eW6zg1+0SCn5oGVo9TSuL/WUassw5gQpJlsk/yjZavT/X/diKmppXW bXmQ1/lC+JZxHWm9EaT6Ndjbz2qPtqhttgmwdnLNVLrLDq5gUF3fn8F3wC4OA4v6vygo uzOF/zJQPjQ7l+Cm8GoJmSdaaGNkj12elz5Bi3Am1UvG5nWDhN6owDw+1sLmL7Qak3eG rGoiKvySxPwe/mGEWRiyYdGxujlTgEYL386GNmHeSTdD5tnRS07+cQljxihrpHyrTS1k eL0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=muUTjP25aYFmNXaLyBGB13a2mB/gemsyPXw0y/fSJkY=; b=UhElIJPSazAUHTbAOXHJEXwU/nP+4Y8NKjf1tJdjlSCkuXieak4XiV2W4knQAtG9gF bSlTWu7TY09Bavvp5u0cDes0ITyPvIGvVljaZoTI3oX2ZIuU+dUJSilPAn8ZmJ4q9IQX PflZgihro0njeyvdnOEFCvptzS+Evki27ndsfBL/mwmoDhL0MHHwoKXOzB0EXHGQyxE3 hrW0FDF5ZFGpab+ViEW4RR99NBjssYJMHvmc5yAK9/JhT19EiSEvzOKhxSt5af4xGfeK bFzQEWc0ncLJnM8Vv6iO7tW3RMsoN3Y2OI61fK1TMTgEyR8pgqRuZWt2l5298Ot3eZuF ErMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=tbtiGiX8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b="4yj3hR/7"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m23-20020a637117000000b005539083748csi4367694pgc.902.2023.06.19.02.58.36; Mon, 19 Jun 2023 02:58:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=tbtiGiX8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b="4yj3hR/7"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231759AbjFSJ5F (ORCPT + 99 others); Mon, 19 Jun 2023 05:57:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231738AbjFSJ4s (ORCPT ); Mon, 19 Jun 2023 05:56:48 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B86E713D; Mon, 19 Jun 2023 02:56:44 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 63C8E1F37C; Mon, 19 Jun 2023 09:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1687168603; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=muUTjP25aYFmNXaLyBGB13a2mB/gemsyPXw0y/fSJkY=; b=tbtiGiX80YAT6jPK+U/vZj+hgHIg9p75BCFi001xezlolDZyipzy07OqrfRefEbf4dV5EM qXKCOaiOOm2drgGa2uzkAfBrTMGs0u6y6O+gXdLb9LR8mYoiABphYf2A+3aSuBEeJUSfl0 080X67FW1yX8DDMW4ffGWuYyUOV+FXE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1687168603; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=muUTjP25aYFmNXaLyBGB13a2mB/gemsyPXw0y/fSJkY=; b=4yj3hR/7cdSaAU6VGtPxoXcyKUVufEHzpM/+ahqqUyabkHOKXKxncQcCLFyPHoWlgf1yyq JQEMpcSJZvgYYYBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 57717138E8; Mon, 19 Jun 2023 09:56:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8edaFVsmkGQRNwAAMHmgww (envelope-from ); Mon, 19 Jun 2023 09:56:43 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id EE4CFA0755; Mon, 19 Jun 2023 11:56:42 +0200 (CEST) Date: Mon, 19 Jun 2023 11:56:42 +0200 From: Jan Kara To: Bean Huo Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, akpm@linux-foundation.org, jack@suse.cz, jack@suse.com, tytso@mit.edu, adilger.kernel@dilger.ca, mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com, beanhuo@micron.com Subject: Re: [PATCH v1 5/5] udf: No need to check return value of block_commit_write() Message-ID: <20230619095642.vjb5fjyhgnbp2drc@quack3> References: <20230618213250.694110-1-beanhuo@iokpp.de> <20230618213250.694110-6-beanhuo@iokpp.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230618213250.694110-6-beanhuo@iokpp.de> X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sun 18-06-23 23:32:50, Bean Huo wrote: > From: Bean Huo > > Remove unnecessary check on the return value of block_commit_write(). > > Signed-off-by: Bean Huo Looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/udf/file.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/fs/udf/file.c b/fs/udf/file.c > index 8238f742377b..b1a062922a24 100644 > --- a/fs/udf/file.c > +++ b/fs/udf/file.c > @@ -67,13 +67,13 @@ static vm_fault_t udf_page_mkwrite(struct vm_fault *vmf) > else > end = PAGE_SIZE; > err = __block_write_begin(page, 0, end, udf_get_block); > - if (!err) > - err = block_commit_write(page, 0, end); > - if (err < 0) { > + if (err) { > unlock_page(page); > ret = block_page_mkwrite_return(err); > goto out_unlock; > } > + > + block_commit_write(page, 0, end); > out_dirty: > set_page_dirty(page); > wait_for_stable_page(page); > -- > 2.34.1 > -- Jan Kara SUSE Labs, CR