From patchwork Mon Jun 19 21:18:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 13286059 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aib29ajc249.phx1.oracleemaildelivery.com (aib29ajc249.phx1.oracleemaildelivery.com [192.29.103.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F280BEB64DD for ; Tue, 20 Jun 2023 14:56:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=J5Q2nMxTPEGbx91acjM+/Ecm9L6znh5S3h7V1f1w6Mw=; b=tDi4oBfl07OJJ3tp0i2JcLAu6cE4syHtmOcokLd9UPEYe1QBmifUsvXXvai04XIMtYXKgcImWrZ3 rob4yJI7UUB3oLPz3g/Zs2mp3J/+hL7yLpSF1xaZAcKBvCFfd0p/PztPQKhgFPKHh2ZBUh9KrUDx bGYoQsCWuKSNDxIBySt8ELY1B/i8B6Zt5bPpRlyW+duS+qcDt7ekoeHhdbSUFGwPaSwLt845YujC +Tz8oGjKgWMQScrpMnKH0qijeQ6mC7Ewj/RaEb8UbYt+QFEk3oDLu9EcnRs07Qi0xGzZZldAzAeY A2RaJ0onrRUDxiJGRv2CWxTHqH4V65pdsg6sjQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=J5Q2nMxTPEGbx91acjM+/Ecm9L6znh5S3h7V1f1w6Mw=; b=OIUyYN1rkBuKLyDVD/K2FnAUAbUqcnXpJfic55+0sWdj1EF2qCP2wCUAHMITIjPID50LUqBu+0US B2ne4rSYo7Y6yMp94iERqgJBRM6BuM6Vp8McKv0FO4JUgfHdVgDXWfVgJa3jxFN/joH3vYN6fuwK Sy0JTE0Zex20BlQMQexrCYIoxEfkbzpkNWfHTvZ26TxPRNlyTd3OyNG6a0j0wsd31GVr8fEm437i CIa29vzxmN7Yy43TZH4wq3HZv8Nq5rFFMJJ+5CIQBLTdQlo9QqksYma8wdYiK6shcroeaiICQMuI HqUvgd59/75XhH/arY9m1HrF2fAsY4HNo2VRrQ== Received: by omta-ad2-fd1-202-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230523 64bit (built May 23 2023)) with ESMTPS id <0RWK00L7645YR5B0@omta-ad2-fd1-202-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Tue, 20 Jun 2023 14:56:22 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; t=1687209521; cv=none; d=strato.com; s=strato-dkim-0002; b=LFVXYnZJP3AC4ueU5OSFywkBghrWBMJoaPp1Nr786WBT4H25sdRZekQJto2nthGHHl 1omr2W+S6zVlnSVtcyAW/YdVI9zlNiyjATrEYkcU71j6CtA346ESRbk3UwBGZjHTUo/a JiCy1BwEWoief1uGdfq0aJGOJR/1llf87lIJtGUFoNVkEj/0qxY8x4yYZ/ZwKxa2z/89 vJyUkfkTLHe+Yw+4c6ka4IzxyuTPz68FbAytIlF9/75kd23AQIpmnMIZkt2pQ4Pl1ZUV mUWumFY6Fp4wNkrzM/Sdfod2a1ui+wZkE7jsZVtrhZkUvIQkQyCd4q4Cx+qPd0jZJNK+ eMLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1687209521; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=NGBMcxhHLHH11bvOk7/wD+Xn9RcgMORp7BCVCyG5YE0=; b=AmoXSgTVG1F6LCKvW6LHTtlBOukQR3A7nuDxN8+LBG7M15CyW1KdJuR42QHlzHEqJx hXvHMHoYFOEsxZ/bZJwDcnxhl06tuw8EXsmoShxmel3WkGFQjzbeMpdGeeeVHTdM2RZ1 rrLB1+BQ8gVcW4CUd8f9ctiUTuDCfQsRgWabhYkfge5JLkttFrQXxtEd+tXWVtGbSzo5 qDd5sZAD1xBsZEdIFb4x5VyJEs8msvDVbzNTkDWFQomAx19x4CcI2x/rA8ZDTh8ZS6YL RuxWZeeT/2J8qRAa/JvuPLO7ls1FKeb39iIi0p4SARtsnVoIcGUpgFjhiFF+z6pBENyB eL0w== ARC-Authentication-results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1687209521; s=strato-dkim-0002; d=iokpp.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=NGBMcxhHLHH11bvOk7/wD+Xn9RcgMORp7BCVCyG5YE0=; b=fjfTtql55O5eGJWVBFn9vZgvbB6aFpEsu1u1CJBfw2sCVF2CQyHS3QTOcEIoaUef/m DMmTxrRdiKmdgn6f3t8nMGFmUoLZhaKk429s3JuidosIF4uHOc6bQCBd+BkuHbJQZBUJ 6oW7TZEbzK+myWi7R+bRHSYM5fUxTQsFFc9Hz0ozKdCv7zAtUv4caiswcOCNFAYxUC5B BTBfEMTo3gx/EbJamvuYWrMR1gyXSO2UsS8Ack7H3oYCUi7ZA9bfC394OoesAXpaOUl5 KyRJozJ1VZLUcTjInUbe/Xk+g/o3J9w2RYq6B4tpd8PoiL23dVlHBwCaEX6Vq5X4b227 4tvA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1687209521; s=strato-dkim-0003; d=iokpp.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=NGBMcxhHLHH11bvOk7/wD+Xn9RcgMORp7BCVCyG5YE0=; b=jHNcYo6tA2Qyd2g4wy+0S9wCS4sVfUGddQdOOD7Ivi00xskuQrYie0D6cGE0F9UYt0 edZbZL70/elm5QDN0fBg== To: 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 Date: Mon, 19 Jun 2023 23:18:23 +0200 Message-id: <20230619211827.707054-2-beanhuo@iokpp.de> X-Mailer: git-send-email 2.34.1 In-reply-to: <20230619211827.707054-1-beanhuo@iokpp.de> References: <20230619211827.707054-1-beanhuo@iokpp.de> MIME-version: 1.0 X-Source-IP: 81.169.146.170 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10746 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 suspectscore=0 priorityscore=0 bulkscore=0 clxscore=50 phishscore=0 impostorscore=0 mlxlogscore=478 adultscore=0 mlxscore=0 malwarescore=0 unknownsenderscore=20 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306190196 Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com, beanhuo@micron.com Subject: [Ocfs2-devel] [PATCH v2 1/5] fs/buffer: clean up block_commit_write X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Bean Huo via Ocfs2-devel Reply-to: Bean Huo Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Errors-to: ocfs2-devel-bounces@oss.oracle.com X-RZG-CLASS-ID: mo02 X-RZG-AUTH: ":LmkFe0i9dN8c2t4QQyGBB/NDXvjDB6pBSedrgBzPc9DUyubU4DD1EQ33bneoxgmq7ABeEwyjghc0WGLJ+05px4XK4px0+bSzE8qij5Q=" X-ServerName: mo4-p02-ob.smtp.rzone.de X-Proofpoint-SPF-Result: None X-Spam: Clean X-Proofpoint-GUID: 3sjJmE3yFbVZ2yJmtFbjRbZMkUh3YjMJ X-Proofpoint-ORIG-GUID: 3sjJmE3yFbVZ2yJmtFbjRbZMkUh3YjMJ X-Mailman-Approved-At: Tue, 20 Jun 2023 14:56:20 +0000 Reporting-Meta: AAEmdgMBAEAP8qGQGTm2UMxULcQPjD4bGQ9MBk0jQmq+tVfixqm/+9Awh/VIUHev pCQ5SQwHEwJNzRxq4N1tPnlKzg7x4ouo/4IpR5VeRyEwNFvEYFH47eGiANrRwffG FzhFoCF0fx+t9aOdBJBW2a9Ig2YHDtXGjtg4NNIE11nHiOHQDyBmMshxpfJjtdwZ LvMWc5NqfOZUE0j8VgofGsotNtsAlARwVwMx/ExJXn0ICHmaWaKKrXqlLhBxVB9Z GQa3v+S10YmOICQDww/lUtRgh9n7pTG0RoJisq0xs+9qGri8zlP2dvXWIqEuUkue TX5IP8IE7DNoc1X+e0v/iZjTW+WQ7B3ZmsrVI5TTPtH+SbFXD2Vx4FbYeP9aQqyV XXRanZTHBMm9p+efchELJdKhzanL9ZrrpGGNbuu1KattnbWRMES+8Mn6yWZ++pk/ H1UKMn1wgq1Dl1gaZ7S/Cb1We54+v/RHU9EOKHWkjaH6Ic5LKhFrNKNGznEBmPRC mD7zNa/ZZfNL0ATyVvUg01u4VXqdZAh5vTXVTd+xs4gb From: Bean Huo Originally inode is used to get blksize, after commit 45bce8f3e343 ("fs/buffer.c: make block-size be per-page and protected by the page lock"), __block_commit_write no longer uses this parameter inode, this patch is to remove inode and clean up block_commit_write. Signed-off-by: Bean Huo Reviewed-by: Jan Kara --- fs/buffer.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index a7fc561758b1..b88bb7ec38be 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2116,8 +2116,7 @@ int __block_write_begin(struct page *page, loff_t pos, unsigned len, } EXPORT_SYMBOL(__block_write_begin); -static int __block_commit_write(struct inode *inode, struct page *page, - unsigned from, unsigned to) +int block_commit_write(struct page *page, unsigned int from, unsigned int to) { unsigned block_start, block_end; int partial = 0; @@ -2154,6 +2153,7 @@ static int __block_commit_write(struct inode *inode, struct page *page, SetPageUptodate(page); return 0; } +EXPORT_SYMBOL(block_commit_write); /* * block_write_begin takes care of the basic task of block allocation and @@ -2188,7 +2188,6 @@ int block_write_end(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct page *page, void *fsdata) { - struct inode *inode = mapping->host; unsigned start; start = pos & (PAGE_SIZE - 1); @@ -2214,7 +2213,7 @@ int block_write_end(struct file *file, struct address_space *mapping, flush_dcache_page(page); /* This could be a short (even 0-length) commit */ - __block_commit_write(inode, page, start, start+copied); + block_commit_write(page, start, start+copied); return copied; } @@ -2535,14 +2534,6 @@ int cont_write_begin(struct file *file, struct address_space *mapping, } EXPORT_SYMBOL(cont_write_begin); -int block_commit_write(struct page *page, unsigned from, unsigned to) -{ - struct inode *inode = page->mapping->host; - __block_commit_write(inode,page,from,to); - return 0; -} -EXPORT_SYMBOL(block_commit_write); - /* * block_page_mkwrite() is not allowed to change the file size as it gets * called from a page fault handler when a page is first dirtied. Hence we must From patchwork Mon Jun 19 21:18:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 13286054 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aib29ajc250.phx1.oracleemaildelivery.com (aib29ajc250.phx1.oracleemaildelivery.com [192.29.103.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40510C3DA40 for ; Tue, 20 Jun 2023 14:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=K4BGzWXVW9IofMSzvnZICrRC8W2vrC0dbDNHpy2yiME=; b=xWnCO7nSmSg5/IGXcmnR//C3av5Nfrmx8qBxuY5/4ZX97CmZT5DxOPonaW/phsfCOs80Tcb3hjMj o0v/E19DwH1+fCuuNmvbjWhyF6anga00pO6obKsJL2jLyr8hrHwP/5C28llgigedCRQnGYevpBmW VtLRfd1UMNA0rRnoNNLWmbdJNG6nwVkCYZtpUioAhH1XVP+7Djv84i+bzYl1VJoJQp/p4vUeBah3 vxBr5HZ6l+yoAqG/svkiVwwKjxH5dz+OrLI1YDLORKgzlsHYmBRav6mPPAFQMRE22QebjR6ZGtqG cZha3WTpPIYmmwZFKJuqh9G0RfpTihxiBMolDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=K4BGzWXVW9IofMSzvnZICrRC8W2vrC0dbDNHpy2yiME=; b=Lq28rfsMDlFiQ1iB5HyH4Mb/Vun77QBOUd7wpiM2GcQyfgXmQ/XT9VmFT7WPiF1uxBP6RrhRjDLQ LE+zFUYJCAbaun/MTIOKTqiT6xrepbSei8PaIuZdjS5w3pFFtrVEWRsIOKlpnmpAz7EAn9mlBr3N v7Gyh3KBjwCWJurZ3S2lmF43RhR3Xx82r11appfNjSA42yD9l+zqvD7hdaIY2kXDbPRhBDZ9Ir7p Q1KwrA/gW2sDRpFVdCZqRg6UkgSd+XT97HkiOyBnKkmZoUVlAPqUUSZ0wTCfxmDumEt9AENlDgYj 4lgx3n9VUA6ZDAFuNBuE7Ngmh6h1DskAknUexg== Received: by omta-ad2-fd3-201-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230523 64bit (built May 23 2023)) with ESMTPS id <0RWK0049H45YPU10@omta-ad2-fd3-201-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Tue, 20 Jun 2023 14:56:22 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; t=1687209523; cv=none; d=strato.com; s=strato-dkim-0002; b=iXW+saF7kB84ux5Sh1GzvZJAKM5oOuBilsfWS6nJnsZqanSKwfNjFgvG+3uYC0At5T 46+OSOvw14hhWN6sm7Q7fuSykcen5VPB9u+VR6Ks0MZDuDqDxJOH/1EQx+GI0Tt1V3wY V5b0WQQDknmTJSCBu1XqeLKozTUBqeIZO3aqTY8tZRz0en4UIAHlS0utuDXGJSqaRDrM yg3ZCSRoGdycEFF9T2xShKPKoHS8AswK+NKMBJiWfWoO99oGiS+4c9DJptA9zpLxX7Mf r8lguh0sBxgDMd83ERZopQUICpfj25TduZPOGqceozxeJfI1NEDsIX9MVJv7XaRmunfH t5ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1687209523; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=CKdAZMZFL1lysf+KGzAf1YfN52/k1jfBpqK7BEK4ECQ=; b=NdjepsXemP4zX5eP3+nASzm2MBNXIYeXB5ZOeZYL7NaB2qDBYchN58t2uXgJ7ajkPI kIeJVCh6dwRAtRDgPoCTb+wmqKQcQl1ETExCOA3GpIPBKAnvwGDeTRNsKf4rb1qurIHv mu9UlQhGvnN/octEhj8+IFkfNqEW0fYPt9qGbrMgbMlE+fP6RhTOFbMs1XXSiduTcI6w w0uWSS/XdOmXQaHWK4Imb0gLj77x7hLzS+QMkugDtzVYuMMWUvSXg64/GDBHPhZjAiN4 xhju/kIw3MUXy5Aw+lbD91HWLDrEm+1USzWhnNRf3sMBxi4YY0XPrmJqHzesDqWRiAsA Q0yw== ARC-Authentication-results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1687209523; s=strato-dkim-0002; d=iokpp.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=CKdAZMZFL1lysf+KGzAf1YfN52/k1jfBpqK7BEK4ECQ=; b=EvvbgWM/eCMk0n1VSSbXT5rhdyml+1hWKggc7OV/TwNzf/lpxIRIiAsZ/IxitXniZY L3eFUQ1m/YIeeOrkAqyaWo8LAbRKm+8bwV1Ui+7s3nf22PWg+Ep5dWyWWSITcXZeWJJ4 hNCb4IvvFumuArPd1HZDHAoXshSeoCVCIqwYdjknsaDDW2um3+K+lQVQfW9HgBGYulSV Yl4kFTUp3hEgo8eR0lJAKVP+IbW7eTh3i/7Cvp1kuwfhwAOxmWOSxrTMVyQ11S8+B3u9 h7jBvR1GbtaYn9hKMeq26e56ajUUGopdYp2L9jBuKWQBDohJ1OecAzcdk8JaMPp6ixEp aShw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1687209523; s=strato-dkim-0003; d=iokpp.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=CKdAZMZFL1lysf+KGzAf1YfN52/k1jfBpqK7BEK4ECQ=; b=QqgNxw3eGfr+h4MqDUBKk1EMddioMAgXV+MI/gO1qh6s+TOSnMStcOSBEOs8ATjUi0 bWc3AC1Oo2rjqpMNwIDg== To: 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 Date: Mon, 19 Jun 2023 23:18:24 +0200 Message-id: <20230619211827.707054-3-beanhuo@iokpp.de> X-Mailer: git-send-email 2.34.1 In-reply-to: <20230619211827.707054-1-beanhuo@iokpp.de> References: <20230619211827.707054-1-beanhuo@iokpp.de> MIME-version: 1.0 X-Source-IP: 85.215.255.80 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10746 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 lowpriorityscore=0 mlxscore=0 malwarescore=0 unknownsenderscore=20 spamscore=0 impostorscore=0 mlxlogscore=789 suspectscore=0 phishscore=0 bulkscore=0 clxscore=36 priorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306190196 Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com, beanhuo@micron.com Subject: [Ocfs2-devel] [PATCH v2 2/5] ext4: No need to check return value of block_commit_write() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Bean Huo via Ocfs2-devel Reply-to: Bean Huo Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Errors-to: ocfs2-devel-bounces@oss.oracle.com X-RZG-CLASS-ID: mo02 X-RZG-AUTH: ":LmkFe0i9dN8c2t4QQyGBB/NDXvjDB6pBSedrgBzPc9DUyubU4DD1EQ33bneoxgmq7ABeEwyjghc0WGLJ+05px4XK4px0+bSzE8qij5Q=" X-ServerName: mo4-p02-ob.smtp.rzone.de X-Proofpoint-SPF-Result: None X-Spam: Clean X-Proofpoint-GUID: 89T7dFLORMot4TxWJz0flcNugMGrwfQW X-Proofpoint-ORIG-GUID: 89T7dFLORMot4TxWJz0flcNugMGrwfQW X-Mailman-Approved-At: Tue, 20 Jun 2023 14:56:20 +0000 Reporting-Meta: AAHAtckAKFi1UxcRjLIJBvtI9yXX2DEYEQ8aAG/WoXG6qJbuYAXwL/Lb+twLNtON 7rbh37hFE+lKFzvq6RRxLu3K1ToOKZDEuJhycptYvkRt28GG9eSUNGmsopGOphUp a4HrOEoz7Rv66jIsqD62fruH2x0RAeN1U5t7QvolZg5BECvcuJ67KxXydvXc70cC EwdJSAtROsA63mghXXCCAr+lDiKTZUf2RrhF6cRvXHh1FMZcXgWaghac2qCWSzIU xGIQL84ZtI7st2yEjfhRm6WiLQnWe2Cn7Me4aubi4ipZDAxThR0LAilvbcCrcyWz 7UbWm/4LNfVmczFCQNC+Hr2cVPy/IVorPD2kwgRynVR3v0vU2v1r1fx4RljJv0DO 2sbWDMnGZiK5IGKnz1w9sLn7z5jCIdDzfQc8oSX9xVs9VT5tYgorQ2EtQd7LH2Yl j+3Mss3/Q0wlLoljahTCjjR/DMTmf4gCYJeSfrjvQPCmmtvPFrKGwcIqbLQVZDb6 YrIvRPUUq9IyL4c/rVaSWK0ptCKNtnkHjSas4Rmi1qI= From: Bean Huo Remove unnecessary check on the return value of block_commit_write(), because it always returns 0. Signed-off-by: Bean Huo Reviewed-by: Jan Kara --- fs/ext4/move_extent.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index b5af2fc03b2f..f4b4861a74ee 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c @@ -392,14 +392,11 @@ move_extent_per_page(struct file *o_filp, struct inode *donor_inode, for (i = 0; i < block_len_in_page; i++) { *err = ext4_get_block(orig_inode, orig_blk_offset + i, bh, 0); if (*err < 0) - break; + goto repair_branches; bh = bh->b_this_page; } - if (!*err) - *err = block_commit_write(&folio[0]->page, from, from + replaced_size); - if (unlikely(*err < 0)) - goto repair_branches; + block_commit_write(&folio[0]->page, from, from + replaced_size); /* Even in case of data=writeback it is reasonable to pin * inode to transaction, to prevent unexpected data loss */ From patchwork Mon Jun 19 21:18:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 13286057 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aib29ajc255.phx1.oracleemaildelivery.com (aib29ajc255.phx1.oracleemaildelivery.com [192.29.103.255]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78A06EB64D7 for ; Tue, 20 Jun 2023 14:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=0Ghc13FFFWoUQ5xC1dLshFpIuYwW0ZF410jTpzVIX88=; b=yfvuItRNK743caJroVQQGrrNMN6HVX1IObbNqQuwnnTCxHIU8d3KrV3e6Pn0FiOCSQGOxoCXJ3ZI oFPWCMi0G/3JkXEutthADzlPz6qZ2iMxa23OxR7IL2lXJndN6ajVHmsCeWRyTlFKeZQL+sCxyBce ia4LU1mrGJuEAviHzoMHvNKTXNWaudt+NILEjw35YecOHmYuYlLHlJdNT5E8j/u/TKEpSCq7cUfD Dk3bh/PysjmUHRdRoiIe9s9jfYlWxW+DGd2Xm07mZ/rSgu6yBHLNMoO1D2n90zfSkOG4hhwZKXab MXloivAC//YB7siE1arVsID6dEKprk7MIvIYJw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=0Ghc13FFFWoUQ5xC1dLshFpIuYwW0ZF410jTpzVIX88=; b=sFVtd7OXyfIXaFQnwhBo+YKfICvvP9veIS2Z8x10AsYxeUkpo6cKPekMBC7WXdr0B7atrz3Wq1Rm h2qJKmZX1XDc7lS6f4R9IqExxh/7vgpf1Yguy8PDqydHTuoNgKN14cNyo8iF6238TD6ELJfcqcXN dIQTcxq3J1mdhyUsFJZFExdp/aiHoPYT8kElSF9WTdoa+Ax6r1k+gxhqySDjzv4umHRfeRXf3OB/ HAxpW6KrFmPJlMuYY6rsqzjkALc21GQPmeTovgKNmUnnA2qMBvpAIhddkIpYfAGlUT+2FRiNe69t n/dSN6caIHn4r9emfl9A8v0zYOw77q/mCFsbMg== Received: by omta-ad3-fd3-302-us-phoenix-1.omtaad3.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230523 64bit (built May 23 2023)) with ESMTPS id <0RWK000C545YR2C0@omta-ad3-fd3-302-us-phoenix-1.omtaad3.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Tue, 20 Jun 2023 14:56:22 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; t=1687209524; cv=none; d=strato.com; s=strato-dkim-0002; b=AaIvbocbXnLddTJMfkpJqlY+SicR25hAKIFhPjOIulppVG/MQ7mBiD+X9ZfeDzCT6G ZhmNMLMT9qWk5HQYS/tbm2VJnWArlDt5rybEIuiyaOV8QcSI3IS0yaY7gXmoj8TowWmm zoHLeIIr4JKp/O2mZILLcTlo4XBCvTt7tHIlX2k6Ygqm1xmoFV9tHoak5A6i1sdAkNYg emjOLMYe6V3cl15uLorq3YPtvqUUEWhR0AGo6cAZ2rsufFfqdLlBH4L2cPwfpXDKRSDy SGPqyqHI58TfX/YdfLaY/Ikv76gRJfujCD8UzuJKIIb6OglA9HvG7XdM4WO5xojWhGnB e2+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1687209524; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=e7SgMagTj0KzNfQID209UAiku5Vv3G7zNV+yggrUOg0=; b=Ew+b/YKs8kx7BkXCAj0i4MlXqoZ2AWq5VKfYj0Anc0b/qiUpfrwMux6D1Qyn40jisZ Rb4EmNjQiDzRlMPVzEgy3jC6MBfCiK70jA+b8dT/FKCMnl4zak4syhDOX4ih9k1z0LZN i+y6AjnMxEBac2WhLAAMrlxVOFqi/8wieGhhh3dPVj9OYxB+GN6dnRSfMo792BssGdYA o1rqqNeCVZ3UvFiMOKMwDuwGp82JmEWBrjPYroyfq9iRVVwLbpnSP3BflnhCXBXbA7cS ZzaQNRApre3d/pYSgSou04EXqBAN3MTx1TBOwgGSGrA0w5xZyDZqvHH1NGZGj7El04+k 13IA== ARC-Authentication-results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1687209524; s=strato-dkim-0002; d=iokpp.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=e7SgMagTj0KzNfQID209UAiku5Vv3G7zNV+yggrUOg0=; b=tnMfLNKBqdAppzTDzen+nISXF+7zLhHNYWQb7OCNkxdOzGrSO2c35RA972mfouTBzA bFgCMbKzliAdxQM1PscO6XLaGolVQm1yNZ3uUXSVzFr+rR7hXLbbEE+chqY3mOo9wTYr aLYBALR5LOF9cbisSX1wvpPXKrRdlMoNSMvqdpxgDNoUVj/68dpo8A3JAKA1XVxB6PrU Brw0yaPJWcO0lggtGTLy6SYdWZzobHjda1UYvbRqKUNJVGR7THmodrnrP++iW+1hpzvg VXW9QAiFA5tkz1Q+q0Zh+UDjpdqAePj6TJ/jKMLz6VA/A9qxlg2o638P/BfnfhSo0V4h DQbA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1687209524; s=strato-dkim-0003; d=iokpp.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=e7SgMagTj0KzNfQID209UAiku5Vv3G7zNV+yggrUOg0=; b=yvRWX6/xx1vRUETU4+aQN4AZUBe951mXyeNy1E+9TrEe/RAbSDFqU8p1dKwDt8G2aX 7tZhIOxKcytpoqWrLYCQ== To: 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 Date: Mon, 19 Jun 2023 23:18:25 +0200 Message-id: <20230619211827.707054-4-beanhuo@iokpp.de> X-Mailer: git-send-email 2.34.1 In-reply-to: <20230619211827.707054-1-beanhuo@iokpp.de> References: <20230619211827.707054-1-beanhuo@iokpp.de> MIME-version: 1.0 X-Source-IP: 81.169.146.170 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10746 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 clxscore=113 mlxlogscore=698 unknownsenderscore=20 phishscore=0 priorityscore=120 adultscore=0 impostorscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306190196 Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com, beanhuo@micron.com Subject: [Ocfs2-devel] [PATCH v2 3/5] fs/ocfs2: No need to check return value of block_commit_write() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Bean Huo via Ocfs2-devel Reply-to: Bean Huo Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Errors-to: ocfs2-devel-bounces@oss.oracle.com X-RZG-CLASS-ID: mo02 X-RZG-AUTH: ":LmkFe0i9dN8c2t4QQyGBB/NDXvjDB6pBSedrgBzPc9DUyubU4DD1EQ33bneoxgmq7ABeEwyjghc0WGLJ+05px4XK4px0+bSzE8qij5Q=" X-ServerName: mo4-p02-ob.smtp.rzone.de X-Proofpoint-SPF-Result: None X-Spam: Clean X-Proofpoint-GUID: uW23cCM5oRbivJajXLuleN3zV-bBRM0c X-Proofpoint-ORIG-GUID: uW23cCM5oRbivJajXLuleN3zV-bBRM0c X-Mailman-Approved-At: Tue, 20 Jun 2023 14:56:20 +0000 Reporting-Meta: AAE2l0QuAGczG5HmpIzJGiddfquCRpGjN6APR4P+p/bGHofp+6nKdcOaqQ/xiX4L nPJ7am5WrsktH2G5FLxhU9BLWYBuvLtmF4j+uvvYqbU6ZCQYmfLgyHwccbWWc8cU MdzUQ2G3ptK2rZI2X/dAQwFF/wTAc4nAMk5JCcrSaxvIpmovJutxIb34lQstjk4h sLS2YDhCwnCsrBUtymxTH1ecOzj4JhEEszwXPyOP1IeZfb6dMDobWkW+kaNvTB6h bJIiP6yO8uCrXwUZ7HAYys1Tt4Tw8i2ytb217PUOgZSFlQt6A3YO1PtiHIy96wym nGz6emngK572ru4ZnaybXY4Jx2moUKNmpxrgTfE9ikgHCu2NVVKriZ82w6mCZOwU /A+X2NaUWuo7S3S4+qt8sKQsIezhZGyTH7wwj3iYFJITPvv5WNJpYWYiY6+d7FRz mbUSS9hJTJGlEyisQ6rj2CZZm2NXeIHj27ggztIk0veGt3At34NP5maQMfmicsQm 211N+cv90SqChBOi8FRF2bApUqISOcv5EGCG82OBKtSj From: Bean Huo Remove unnecessary check on the return value of block_commit_write(), because it always returns 0. Signed-off-by: Bean Huo Reviewed-by: Jan Kara --- fs/ocfs2/file.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index efb09de4343d..39d8dbb26bb3 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -808,12 +808,7 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from, /* must not update i_size! */ - ret = block_commit_write(page, block_start + 1, - block_start + 1); - if (ret < 0) - mlog_errno(ret); - else - ret = 0; + block_commit_write(page, block_start + 1, block_start + 1); } /* From patchwork Mon Jun 19 21:18:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 13286061 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aib29ajc249.phx1.oracleemaildelivery.com (aib29ajc249.phx1.oracleemaildelivery.com [192.29.103.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DCDCFEB64DB for ; Tue, 20 Jun 2023 14:57:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=QbB7VUVipyx5vQRD3VmFIIoA7FojekIxRnB4gSiziyw=; b=XV4TsbApWs1foDgxke/PXwhruM01Lw7rs761J6XmlZ3O2KJPdoEiMTOzN3UwIPk27rbT2/RSrigu tU9Fs7955+d/tIktY/s+nNHcB/7amLU1AB2CAb5hLnAvDYKKPHEDA2+XW2PAj9bwv7rgfi/lBSWI jxCYdA2mJ8WfqTe0m+wT2WSyYKm1niTfkobIHqQDQyWeV3OjtsWD5nYJJBb5xoUY1SllRzRiSbjj xcTQ6sYu/0rR9qu/Kl1ExW4UzKyLu5/v3+9mARu5HQkT05bmuax1A2ebhKfvSzDP/hZdeRXdrVMv qE8Znd5Lsja4cRDPDO/+Utct8nvawo837AOoWw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=QbB7VUVipyx5vQRD3VmFIIoA7FojekIxRnB4gSiziyw=; b=LA9th0Lc4mekFAbofb3HomHKmkysVSK4ScrTlartADd4fGjj8heFLIwXNVNgi1TrHdTgPYed2Tpb DD3/Y1haVciNKPmb6XNw4E0kVCht7o5qqUD7k05OaoN8Jj5JWV/2UaGtBrV6OpDmxbK8n2P8eerD AmfaTyEF01vkDqG0xaUWP62CavxWWPCa4asWiwTAO/tPKgd6b7CKUswOErVLSRkPZUT2X1IQqPs3 jwsCoyhbHW2JQSfWi0r6wHd2uYr8o4p9RWeHUQ6oIVmibX642L8iebFUAYarH0ESZuv77UXRudo/ Pp1btWGVc//V6N2aimJkhh093H0X6A4MFv0Bbg== Received: by omta-ad2-fd1-202-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230523 64bit (built May 23 2023)) with ESMTPS id <0RWK00L4945YM9B0@omta-ad2-fd1-202-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Tue, 20 Jun 2023 14:56:22 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; t=1687209525; cv=none; d=strato.com; s=strato-dkim-0002; b=bwDqLgqKnOIMa/KblGf7DCSOdomLj8qYLhRv9zU+ahqAVFoKEz5MFu0kXcY8KfhAXH tHC35vZ8b79c/wGpvuuwH2QAaTfqAoLCrBrZuHJJxWbHerBhq4PUi7Vxha3Lt8BBT++a OKVlUPZx2OqKhR369+AJkjCvIKU41m/VrYs2EeUKGffe4ZoycTYRomCfx4Cxb4nkBfob KFzO1JtbymOdSs9rmP9sHp/HzaLQpEkbXDikDDwi92tnabyBRhSnzBjy4mUV9h9H0BmU ZZEguartBN4n56Vgd2iftbjGb/E/g0Hu7r1bdkURzOMI+R21jP1xUByJNPN4IFLifAGU 6Z4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1687209525; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=u8a2OuOvxT1/oVmGmWM7pshVQC/wQv12L8jJddp76/w=; b=gZvQrwnarG0oeqM2lTZmo1obElmXryHEiGl5rTaOMytcF5GV6qb10JQRUSTlk78ZBr my2uhiRb7tODlRKlJfZGIMoWNHPtrxmySJWu32wwNlOkOy/CgjyhF3rfjwRPYzKdUJyA Y9Jp/f6lEFTd98Lm3aTZ3eAiF2SAjfE6536aVxKU4p82uao+Cjm5vpmj4aiCg5/w4OAz vXyLTe5Cqi4B70Mwo6078rUhPgHS/Nw9w8zI6M49hVkhWreHqAwDLzEl5Z+N3kyK3Ewk YnnuTk4NqUi55Ri4legQKGcYEdb3sVl6poNHO7b+6p22wVKdoRjfzekB9cuh1zcYyOaA /vBQ== ARC-Authentication-results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1687209525; s=strato-dkim-0002; d=iokpp.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=u8a2OuOvxT1/oVmGmWM7pshVQC/wQv12L8jJddp76/w=; b=NWHvLYHVBE3vESRJ/FKFx1BobgaCF60h+WBAXiODGLsXtceWhYn7PgNv3MV5MXctni FK/8gdXtnsHydylzQbFCYdTwzC4MZmRWSP6OYqsFThJ0kysIE4SDRaLDFxoaXFZLA1xC XckGwVvQhj63Lc9eVAzGHMasn7FQiEPnYraBh8/Ygwm7C3hujqBNPYoJp/F04jznI2Qz OnQixCQPT3StmDtCX5MrkWLj67MM9yggscCU3RdXslVV0bNEHGn/bYstka/MGSE5IKVe QK2OuVNkugRG7bF3ujpI8fK653bXfGgH3fyF2pfZIilyQ7l6tkBDYI3BaO8mzAzaxnGp vZQQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1687209525; s=strato-dkim-0003; d=iokpp.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=u8a2OuOvxT1/oVmGmWM7pshVQC/wQv12L8jJddp76/w=; b=4rKvSZyKZJICpIQNJpD8yX06uHxBEBD8VbMS0AWhaOLUZImM7784EgsI2s7KDFBrz/ ua48CzseU5n1lhgMvhAA== To: 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 Date: Mon, 19 Jun 2023 23:18:26 +0200 Message-id: <20230619211827.707054-5-beanhuo@iokpp.de> X-Mailer: git-send-email 2.34.1 In-reply-to: <20230619211827.707054-1-beanhuo@iokpp.de> References: <20230619211827.707054-1-beanhuo@iokpp.de> MIME-version: 1.0 X-Source-IP: 85.215.255.82 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10746 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 priorityscore=140 phishscore=0 adultscore=0 mlxlogscore=579 unknownsenderscore=20 lowpriorityscore=0 suspectscore=0 bulkscore=0 clxscore=118 impostorscore=0 spamscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306190196 Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com, beanhuo@micron.com Subject: [Ocfs2-devel] [PATCH v2 4/5] udf: No need to check return value of block_commit_write() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Bean Huo via Ocfs2-devel Reply-to: Bean Huo Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Errors-to: ocfs2-devel-bounces@oss.oracle.com X-RZG-CLASS-ID: mo02 X-RZG-AUTH: ":LmkFe0i9dN8c2t4QQyGBB/NDXvjDB6pBSedrgBzPc9DUyubU4DD1EQ33bneoxgmq7ABeEwyjghc0WGLJ+05px4XK4px0+bSzE8qij5Q=" X-ServerName: mo4-p02-ob.smtp.rzone.de X-Proofpoint-SPF-Result: None X-Spam: Clean X-Proofpoint-GUID: Uu9HfpMo4o42gzeANpjgv-Xdiy7ckaOZ X-Proofpoint-ORIG-GUID: Uu9HfpMo4o42gzeANpjgv-Xdiy7ckaOZ X-Mailman-Approved-At: Tue, 20 Jun 2023 14:56:20 +0000 Reporting-Meta: AAHAtckAKFi1UxcRjLIJBvtI9yXX2DEYEQ8aAG/WoXG6qJbuYAXwL/Lb+twLNtON 7rbh37hFE+lKFzvq6RR8Lu3K1ToOKZDEuJgthQpm6Fx+89bvLurLZsX88ThbGqLx XrkGABMA+4p33ln+oIy0ws34FbqjK38IDYJPgvEhQZRSzkEDHdOxhTpxqIjMRNcF 0X6eascLXrdbvQEfyEDk/fREU01SQst5Fiuax7NMgjSxwuL+yby/+xDGGaw1KnZk P4nRiJhLyW0OqQ+ro/aO/f/xLuTEOfh9gGRNfua0Ig7iRbx5gP4/7TGdRa5lRfMw KHqghy08fSPjT8kfSRKT4HPYIZa2VI/gtRpw1uodeNQrFDP4bGh3wTQBiq3MUjjP mL4VbKC/Dth5Pb4Ez+xSrO4Wb99ITnZ4pLyJW7eHBoE8JgbuTMYPV/KgFcVMbup0 IdL9+8VjluZHeVpLrX8hkdBrKcmzo/vwfeVyyqoYjPRnztTCbkgq2VoC28GiPX6u Y9dVvdofaaTVH3PgnPMCN9tK4x2Tx8Pqx9uooKdRQsA= From: Bean Huo Remove unnecessary check on the return value of block_commit_write(), because it always returns 0. Signed-off-by: Bean Huo Reviewed-by: Jan Kara --- 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); From patchwork Mon Jun 19 21:18:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 13286056 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aib29ajc253.phx1.oracleemaildelivery.com (aib29ajc253.phx1.oracleemaildelivery.com [192.29.103.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 884FAC001DE for ; Tue, 20 Jun 2023 14:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=TPj0QLgMgJU0TQxXsIm7wKCuUV87gpo1POs+coGoqmM=; b=LcszkaXGnnS22Q9Fws+EKvtKGSzurRauOz0Idx58RF2BHFmm3mKsDRphx7fNeBEdd60umZXtMup1 +C9f164jQleJy2jRocqsBAQaVETmVxNb+pk0/Ys2TKgo/JXZ73L7re83nDIrxkze9cAveTVY6dDm LQnXM4D2K9Pk1k4qdh0zBGW8dxFoN9lH1PN806xl9kq5LXhoVO+R55i0srr8hPNYndVs3GBTCi1d qa54MaKPzqAnpqR52FguG/GllJON+rnRa1pef6ByuxEPG7kHE/ylSAU9yI+hUA6s04nToK19i+MH Hvt2I5q6EBVWoy5XO4h6adCD7xaBgUTROaOweg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=TPj0QLgMgJU0TQxXsIm7wKCuUV87gpo1POs+coGoqmM=; b=gOWvQLagJjsjxIaqbpz4gp/EuylnUAqQXokaD6DdfWDyh/KAOKrOvUP3ICGFXnXxtjF752azRLMY wxSlhXhDzKtl1yBLOpelNSxoAUcv6lwrMNKeBCw+Tyd5aVyrCq7zvgESTEBJ51idgpMbnuZdgj4l ablg/WzWwoBRqkViHeFIuAT+fKaKVd8rHA3iGuSjiemAr06rPZzmqWIvIKyt2x+/adJqfrSD7eck nm2A9+n2Hm9iumbxvllMHJfdzAVvkE3AjQ3zz1W7Gqi/NOJZkfiibmgjDMhSLDUDR/mABGv1vjZn vkIhGSef/67P1AH9XRTy6voKxUxJC4ytOMBXig== Received: by omta-ad3-fd1-302-us-phoenix-1.omtaad3.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230523 64bit (built May 23 2023)) with ESMTPS id <0RWK0034345ZUH60@omta-ad3-fd1-302-us-phoenix-1.omtaad3.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Tue, 20 Jun 2023 14:56:23 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; t=1687209526; cv=none; d=strato.com; s=strato-dkim-0002; b=m14ydInAO32RSNeBAEUmo5VtS9IdNsIE1lEAXPUqN3jpWhmRIQgK47Y/rbAT3wMzzQ zFtEMz7KVxS3NSfPnKVhU8xUFPgcXLrgGIWN2Mu6997FuL8lqVsKbxqkA5fE3gv3MDvZ JWD0zt4m7taKUiiTj/MHW/kGwq6EOfjUlaUH7tbWkr4Af8BIy7xIimnnWnFOzHZDScLt 3eQQywEXNYQ+IC988XlH/CzjqwE7RWPjci5ZMT3eKpmQ4AYgRzTbVvGQ14Z3slHIt375 Yy3e8mWPjZSUhmyrItczO8JH8++rOTMjFybtj/1ToabmROD6JBE3b3hIRI6t4sFE0TtU aoQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1687209526; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=4VoCJCkUkGyuMs9ktPD9dGvwPKJ6aIyifN3L5LWABx8=; b=JvbswYT1Nxu/3JVFow4AGCMKUY/2XH05O3KHS/AN8d5uMp/6ohrS1PkKNW1d/qNfgx ehqaHoKJtUwJelBXbn8r72WycTsEtzleB3hRsAdSOiMxKKKUyyzM1b0QCThREEAj4AVl q5Zch4h3R7Uu5hmKzx0c67sYBQ7RCDzOg2GeGoQXN0rqERPliWUQ7yvIll/pNLS86+kk ycpoPF2xhfADP3mWfL3TWsU3V7nm1cIVk4/xiq4xy4rgcMqi+C1ZDffmzSuCPuUy2QbM /SnVisX5HcQFQW9BMmEdDPGdYuiBwFgNDv/UpoVl9iqq0weeChmJvaYg58IuIMlqC5Qo pzxA== ARC-Authentication-results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1687209526; s=strato-dkim-0002; d=iokpp.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=4VoCJCkUkGyuMs9ktPD9dGvwPKJ6aIyifN3L5LWABx8=; b=GQuLI20iuo/3e3+FcTWN+gW33eL6iyjV5edlrwBquBLU1yKxMk3gJO7CkF6DC8eUq6 gHTqB7hfa+ATxhvaPSMfQF2q1ieLcDoBiT59Fsr1IPCYkHAsKStHGpL5+2bmwDdUy5o6 wWcaHwSe4L7bsjHTc+Z2xsLCyrvZnNGEpGXihjQrDj+pGs7x89Ywj1dSAEhZdOzDw30X xBQqWzsXqNbS7+ugJ5EL0MiFGcZuz8DhcDB1mRCCRnQFkCb9JzLKyz9t7rn+bd+LO1cC bPTxr2ni/HsxkQCdCwk6SUJrBKWPg4dVvZ6emoZsJFm5HNNbg2fpUBWqLP/n/eSdf1Eq JkWg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1687209526; s=strato-dkim-0003; d=iokpp.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=4VoCJCkUkGyuMs9ktPD9dGvwPKJ6aIyifN3L5LWABx8=; b=Fi7GsifBZj+G9wnlO1nTmf1xXDrGLocv0iS6G3hKSGfd89rdXROo90SMzMsF39I5um 2ld4NTWy8oTessFRFiCw== To: 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 Date: Mon, 19 Jun 2023 23:18:27 +0200 Message-id: <20230619211827.707054-6-beanhuo@iokpp.de> X-Mailer: git-send-email 2.34.1 In-reply-to: <20230619211827.707054-1-beanhuo@iokpp.de> References: <20230619211827.707054-1-beanhuo@iokpp.de> MIME-version: 1.0 X-Source-IP: 81.169.146.172 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10746 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 priorityscore=60 phishscore=0 adultscore=0 mlxlogscore=474 unknownsenderscore=20 lowpriorityscore=0 suspectscore=0 bulkscore=0 clxscore=58 impostorscore=0 spamscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306190196 Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com, beanhuo@micron.com Subject: [Ocfs2-devel] [PATCH v2 5/5] fs/buffer.c: convert block_commit_write to return void X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Bean Huo via Ocfs2-devel Reply-to: Bean Huo Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit Errors-to: ocfs2-devel-bounces@oss.oracle.com X-RZG-CLASS-ID: mo03 X-RZG-AUTH: ":LmkFe0i9dN8c2t4QQyGBB/NDXvjDB6pBSedrgBzPc9DUyubU4DD1EQ33bneoxgmq7ABeEwyjghc0WGLJ+05px4XK4px0+bSzE8qij5Q=" X-ServerName: mo4-p03-ob.smtp.rzone.de X-Proofpoint-SPF-Result: None X-Spam: Clean X-Proofpoint-GUID: LLsJJfqcuWFxKHfAZfeGBtRwE3DFRjdd X-Proofpoint-ORIG-GUID: LLsJJfqcuWFxKHfAZfeGBtRwE3DFRjdd X-Mailman-Approved-At: Tue, 20 Jun 2023 14:56:20 +0000 Reporting-Meta: AAH8OawfXXtrWR3BsHCvBi0VQOlWCZZ0yWR6DNXLm8a5g9v2u0Xf5iEWujwSsL+r WihQMj4vQHeg6ezQifvnx/XkIs//8pNB6x77fcrt0lNh5JxjZ7w15oh+egIlpUv7 FJGjmanlch23H/iUwo2yw8P7kGNgdllgdsQonC0+3uVEnyGE6kfQBnU3HhdZP3V0 p/xtt8wkCX09E30JVtsZ0SDshMsjEvuVbP9bwkO35QWheyJYeAAxueZYN6viQlvw QUkBIHRFEj1DLgS+g5GfmNGYCFwg9CmwoMEZNzhVFsbPn4/tivkf+Ks0o6XaTAem dEBULmeqIpXKXq5vD6PXbIstDUkjk6zOijq+nGM0WcvJXdAjOmzMwavgFIWwVD5+ j6tu4OYEtO/Vdt6wRHrYypAJkSRJHWnPk5Cc0/b07QLSA2e+mOkL0kJfR1sBDJ67 JXRzbiAPDJt7HvkuvdX9OOdnluNN/AIgjsFqCkLn8ZU+4RaImg4Iv0tql4TDgIoX 7kiBh2Xs9n4YRW0lqymH0bNDcZEI/4h8LTebf1D9zzw= From: Bean Huo block_commit_write() always returns 0, this patch changes it to return void. Signed-off-by: Bean Huo Reviewed-by: Jan Kara --- fs/buffer.c | 11 +++++------ include/linux/buffer_head.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index b88bb7ec38be..fa09cf94f771 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2116,7 +2116,7 @@ int __block_write_begin(struct page *page, loff_t pos, unsigned len, } EXPORT_SYMBOL(__block_write_begin); -int block_commit_write(struct page *page, unsigned int from, unsigned int to) +void block_commit_write(struct page *page, unsigned int from, unsigned int to) { unsigned block_start, block_end; int partial = 0; @@ -2151,7 +2151,6 @@ int block_commit_write(struct page *page, unsigned int from, unsigned int to) */ if (!partial) SetPageUptodate(page); - return 0; } EXPORT_SYMBOL(block_commit_write); @@ -2577,11 +2576,11 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, end = PAGE_SIZE; ret = __block_write_begin(page, 0, end, get_block); - if (!ret) - ret = block_commit_write(page, 0, end); - - if (unlikely(ret < 0)) + if (unlikely(ret)) goto out_unlock; + + block_commit_write(page, 0, end); + set_page_dirty(page); wait_for_stable_page(page); return 0; diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 1520793c72da..873653d2f1aa 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -284,7 +284,7 @@ int cont_write_begin(struct file *, struct address_space *, loff_t, unsigned, struct page **, void **, get_block_t *, loff_t *); int generic_cont_expand_simple(struct inode *inode, loff_t size); -int block_commit_write(struct page *page, unsigned from, unsigned to); +void block_commit_write(struct page *page, unsigned int from, unsigned int to); int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, get_block_t get_block); /* Convert errno to return value from ->page_mkwrite() call */