From patchwork Sun Jun 18 21:32:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 13286060 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 72D7EEB64D7 for ; Tue, 20 Jun 2023 14:56:52 +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=B3LZYuDAggCmeuAe5G+a/SF1hQe99A7odhSFx/mKTws=; b=RgXouyNDK5H42rVfftXicFKgkjwPfSBIpH8qUfg/yNjsv1KthXbRlTD00s5OHiB3/JiW6wNYVurC SbfAnvC0sk/JfVc1raZGv1Nifob+3EtYX2Jxnzt0dfdCYhcOBwxj9hlYaH5Tlr64oqvrRPNTc1os 2iDn0gh2H9gxM58qpDGXbLDrGKP7lHHrfFUVzk7ss/6qEMNr+6JSsrtDma45EoFDORXkDT9qp+j4 02Lbo30HI9yxNQxke1AUcq6uap34SgiQnOVRrd5BGvns5YRiE0/joiNejaxxbyh8ZtwEyd1wT98P 7Xdj6MJdTiHnkrtvRUTtavFcTg1Qxvzu38I+nA== 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=B3LZYuDAggCmeuAe5G+a/SF1hQe99A7odhSFx/mKTws=; b=bQ6oVcFi1X73tFdXfVCdXP/FyKx+2csO+jVGlCkkCXcWjdDcgBPKqPKu7qxTv8cwECpbpyhCsKSq vStTME1y/v2xFJfsgrOHicRd1BJfJFZGT08vuX0Y/MjvMAcS0iJ13zKfQbae+nmM1kfZBdmHCwZp NxfM9X0jTbHFR9j+uw8l/BIkiYc2rGj/XefdXrxesGvxWRTQtkRYufv/nM6XN+Ht2F3pJtMjkEOn LEK+Na1+XXqH1kMAxqidi2m0OCA19PXVBwNwSwWmROgwKUu4r8705gBMvR215yEx4ebkVyyC3K9R QD/kZPsQwSoOsEYoKM4U9PAmAM/f97+OOd0JMA== 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 <0RWK00L7G45YR5B0@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=1687123984; cv=none; d=strato.com; s=strato-dkim-0002; b=nWSvTOOnO8ugSK6+/H307s3L5N4uQG5KOysBX2IgampHzUt/e1M7vWIgYdM3yVn8L6 mF36Wi9H8fUj11MVYKe9B3JL/hDoWwgnzOa3dvcISkQQDSb2WEO0SpuCxbpl9ulC48VA 6OTnqS/TmHNy3oQ4R2DtbjIhU7Nohg+aSNxXIW/hxT2ZMWnTYP5q+8lRRwhkjZdu7w8l M4LdL+lzkB6WNMIUSREXZKPuCvrGYQZzoo743PqH5qMBYNux3lLCwnXbWxglyfCgKp9d JjMRY3fdgtxXhCanLp8cu/y+YDIQJYd/ZKZOPMXDY0KPjjpxCPe64ikJHtlBMzm9mmqZ c3oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1687123984; 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=FiS5DxAChRRX4k3Ho2cvADBUbEW2Co/dwGRsyJUkQbY=; b=F1UqAkcdL/glDaJ1655WMMKUY52RDJgVOqcvh+cD7JNw7DLTJekAmQP9YVLy8YWOBF guSVfoSeB8n1uU731qyZ+2YC7+WmUd1aoBptm75em2DG7A0I9YV9NJuGRMXnCNnXU294 CmwqbHfbRSHFnlCjWqWsUA4Re7ELTkbddNyG3e3F5zHhnCOKvViEuF728C4h3kfIP49z ceyU8ATRHqXtto6Jx7yx/Q4/a+0El45664DLB5wW80ELr1N0KPFG7lCoJLDTbf+1GuWJ bW5Tks8uPB7H4X+tPVl3XNjIVDIDbVkrwfOqq5JPKciLf00llz8zYQ8HIq0h2A0FypH/ mlmA== ARC-Authentication-results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1687123984; 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=FiS5DxAChRRX4k3Ho2cvADBUbEW2Co/dwGRsyJUkQbY=; b=PRWXw8CAKoV3Zc0FbJ0k+sd2UEx2mwQS5sPlJ1IMvyUGGrk2/AECJxgw8T9H60V+iT kf2EVFWyYPiH5njS6Yr90PInkPm3bbiSsQOqbEO3o/gQzIMpb4DzqVJRw1SE5b/I2uAx GSla28BN0VEmJRltrEOtfGQvTP6/b2mojhwgA0OmUOhsbDzMpCc4A+/k5f6NOjxIhOLF Yi7snDkMa2CTQrMtS6p8Q0vIAV7Bp+2QT1be6BQJY8RJX9ie+m1vSjmzrnqH2QF5a1vo KuOIRvcXk1STDH86GatVeyNvviTymJ46nAkmGMH1fwNUrLcbDWtT2GXSU5bV+yN964xt 5s8w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1687123984; 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=FiS5DxAChRRX4k3Ho2cvADBUbEW2Co/dwGRsyJUkQbY=; b=t62gJy/K2AlLeFVlbN8g/Eh1wVR4obWhlmtyT/E4D34lZw5GOWaD5/PPUg52sfahSL IphcxhR520CJ6vjmIdAw== 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: Sun, 18 Jun 2023 23:32:46 +0200 Message-id: <20230618213250.694110-2-beanhuo@iokpp.de> X-Mailer: git-send-email 2.34.1 In-reply-to: <20230618213250.694110-1-beanhuo@iokpp.de> References: <20230618213250.694110-1-beanhuo@iokpp.de> MIME-version: 1.0 X-Source-IP: 81.169.146.171 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10745 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 mlxscore=0 adultscore=0 priorityscore=0 unknownsenderscore=20 bulkscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxlogscore=582 impostorscore=0 clxscore=175 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306180205 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 v1 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/NDXvjDB6pBSedrgBzPc9DUyubU4DD1EQ33bneoxgmq5ARfEwes1hW/CxwfjqKzP/cKnUXGNs35zouFQhI=" X-ServerName: mo4-p02-ob.smtp.rzone.de X-Proofpoint-SPF-Result: None X-Spam: Clean X-Proofpoint-GUID: EquwXx_iTqlDTpSv_--WLlanpb00bIfT X-Proofpoint-ORIG-GUID: EquwXx_iTqlDTpSv_--WLlanpb00bIfT X-Mailman-Approved-At: Tue, 20 Jun 2023 14:56:20 +0000 Reporting-Meta: AAHDpdNKOgkuHhNYCU9GXcgZqYaqQXb4j39wnmc4ygVI7iTIW1VXDRMuwKPYHo5u fH08IaJLIZSN350VnoZQyat9BZhVhfu+TeKfO8uwKstjboxTxP4WGALMig6ciPyt wnRZl/JAAhPJS4297KMd8CFdKOvnqaHZMD3bMOAs34FRGxxZHBdka+uYbgDOQtWR kg1bO1zASSEkZxBhp4Rh9lZaieEk20i9szXtTcMij+R4f01Q2noBZahOfqwQLI7d YTMBK8ODxbUGfy+97tWXfRO60bKR0eNem9bL+k9d9Vk6avv8E+HdEWyv3bjgZE5r 0n4Z2V8GqLw9P3ZNt7GxBQ5zCfnp0DLaBcLFi5owlOCN8JbM6sj1dctYn0+zDrq6 f993v/LhPRJWl5cjy8K0u+K588ybECVjLU0H3TShyRtqDjdJE5BSfFDOzK3RFV+9 E+IqgK+2TOaEOOZ9KvtSBpDdaKygLcTthQT6PQOR7c8IWU50brFk9oRJvdsgwrEU 5Sh0dFJ5zFwRrJKIFFe1C8m9BZnxq4e8LjQj/EvanTg= 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 --- 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 Sun Jun 18 21:32:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 13286058 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 aib29ajc245.phx1.oracleemaildelivery.com (aib29ajc245.phx1.oracleemaildelivery.com [192.29.103.245]) (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 55577EB64D7 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=HG04bPFdVs+rAboOuerMNA7+8HUVz6VInazUKj8dzWI=; b=lRMgBCx35fVs5DEFRKGmNtsRtseANonZvYSW/FnoNZrTDkbhcv32ITeVEwO/qayaGcFBxfXRDwGf dcEAIU716CmH7hdEbuXzV3AaVxqOSySYn7aItGeG6XtIaQwP6p3s6EXUfWvwlc9QNam05TVAiZ8F H4/iukdRqX1o+NvtjdCGlmwuus25jLqIirxHLaamtYb2Eu5WN9UrW8YM7KWnXgK60bVbI5BbOuzu Phrq/dTDDiMDkS/cDX021jHfpz8D+9ABy/QmCPewT4LhFvyc0jQ2RmnKNZmsRKhXhFkdI/Ea3+GZ MPL0tYCmtOG4jKT6PbLyQbyAEOpmBTVKgPlkCg== 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=HG04bPFdVs+rAboOuerMNA7+8HUVz6VInazUKj8dzWI=; b=tfED4C/zMgLQq2Me8hWLxV48LliXdjl6GRop7qX4n/v2NbMsWlnbOT3aGSGwyXFIA4av33WAPF8C jXfPqUkH6UN8L7gwcEy/SNzExSiNeKbL4gXRG4yaiA7UfuIDWyKe008GzC1/nj0Pfs3BxmTzQfOS Y1DzMLYE34avhCsfGhPcbk84IEs/qPLYCBcDR5ZasXQUIy44IVjgaUNnNfZbsH+rPhhVxQ/T5pIt ZFER6oGMDQZx5TCIVwPQsIQoPV7OYv1+4SGGRKSMx8nxYIxWo6kMqkhTdYGmLK6EBNOohyg3vgeB Fd4V+9ucVWk+WY36n0J/PZsjanoXsBSEVlmspQ== Received: by omta-ad1-fd1-102-us-phoenix-1.omtaad1.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230523 64bit (built May 23 2023)) with ESMTPS id <0RWK00BN145YFLB0@omta-ad1-fd1-102-us-phoenix-1.omtaad1.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=1687123985; cv=none; d=strato.com; s=strato-dkim-0002; b=LAE7q86rzAmU2pmXqjpSY5LwGTLo9P9aKtp2cfOqbFI7RHUOCTI1MF8XsU9Xo1JDhB x0VW2OQuZbbIMP+ZN0+3pA5GjoydH5L1RIvFShJdJEy4b7CGTKYCR6jFoKDOk11jrXZA gt7bkgHWcCWa7txlU32h5nil+W8SXK5ICLKy5RZ5AsKthjcYLuvhFl5JV1AvWGzkMx1j hVxh/DWjuM8m2y+JNcU3ulC+yELs1eCViYbY7BKrvhbLo0bI0iXYEhnmUOH/1R/E3B8U FtVhrMYMxm4Tzr8OyTwl0UWD9NZez1bAbH91ZbcNoP7QV2ZZ0LB+HY1uY6PdTfy7QRrB 61Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1687123985; 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=5B5W+5M4yQ6bKG+vVuzoT4Vp+ARdlHL0dQxj+aWT0y4=; b=EkKDqpIujVv3I9++MhPh7JUlKKRJ0pywsM2CI93xwU/UvZDUWISWNdraw42ycr1XV6 s4n5FghXNYSo6FE0C4bAtzHTCkxqyB/GGm6mZs/FmS2IEYw6pmYcDYsCTRA/i17Z8sZ4 ACN4NQhvgXJV2zGPCbsgVKQ/6zCQOHsigwk3nwUsf63ZUl5Bxz1A8KSELEMsC19dFafT IBXoY5RDjbdYcdoYHFBSBAXXW09I1mvZI4e2USLcxhyRCtafdnBkhtGKDY4oR+ftOkYO OtRjyRH0jMnq1ZNUTH9BPlkyj87JUOfRKilqHUFVNTyE9H6uFNGfW9/u4kGIWQ25UxMy dluA== ARC-Authentication-results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1687123985; 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=5B5W+5M4yQ6bKG+vVuzoT4Vp+ARdlHL0dQxj+aWT0y4=; b=URFyVNhQkk1WjaPApLrqX+adaZWYjOiIlbBXdl5kGUI1gANR/SZnEzs0y7UwoLUMyz 2CaLiyiOFD21kVRK4dj+u4WgDsU7x/8t4/a2tX+vB0v8b8VSaS+9fFzh/beuQlggg1Kq 2FOYq9d0EJJT4OaD21oNgY/KXWHuExtzJnG3ir73wn/H1yHplydNUlu5FoM5KZC7w+3e ngGjAcdydG/4fvpL0Rfv7QZxi3EBnbdw9rBtXN3XPV2vn15NRvNCJVDO7Q9JFOC5vpDT sfFBhipbowiV+iE9Tg0Xu7lf8cgTz8FDJ78kpOnSPsVPnf9H1KQ/1F/3mK7fgw2Hav3y XyLg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1687123985; 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=5B5W+5M4yQ6bKG+vVuzoT4Vp+ARdlHL0dQxj+aWT0y4=; b=rXH0HnCIuKZMAhQT/dfven9avZ8tIBFI/MJ5WxYXnufXmubYzYnocg+OMHaFyQiJjL zL5crck9utfsfqmr1GAA== 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: Sun, 18 Jun 2023 23:32:47 +0200 Message-id: <20230618213250.694110-3-beanhuo@iokpp.de> X-Mailer: git-send-email 2.34.1 In-reply-to: <20230618213250.694110-1-beanhuo@iokpp.de> References: <20230618213250.694110-1-beanhuo@iokpp.de> MIME-version: 1.0 X-Source-IP: 85.215.255.84 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10745 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 adultscore=0 bulkscore=0 priorityscore=0 clxscore=82 unknownsenderscore=20 mlxscore=0 spamscore=0 malwarescore=0 mlxlogscore=578 impostorscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306180205 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 v1 2/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: mo02 X-RZG-AUTH: ":LmkFe0i9dN8c2t4QQyGBB/NDXvjDB6pBSedrgBzPc9DUyubU4DD1EQ33bneoxgmq5ARfEwes1hW/CxwfjqKzP/cKnUXGNs35zouFQhI=" X-ServerName: mo4-p02-ob.smtp.rzone.de X-Proofpoint-SPF-Result: None X-Spam: Clean X-Proofpoint-GUID: LTS0n4l7rGuy6mfDBMC_WyqetxMDOzp5 X-Proofpoint-ORIG-GUID: LTS0n4l7rGuy6mfDBMC_WyqetxMDOzp5 X-Mailman-Approved-At: Tue, 20 Jun 2023 14:56:20 +0000 Reporting-Meta: AAHBm2dhZkqxGMPhVgKVVMPrwHf1IzTVNHmpJCmcsH1m2xW86YRvw1zA0aMZ+RF5 cksZuV59ngq9laUef9e+lR/jWHJXCmFKywznMIShCrLf4gOAYNNKipnp1bD447i/ +FNMGWvlzqYrIPqdPA3jwxWI81ihzsZo8+5wPZUomlrwRWPWE3J5RD2jJ/t3VK7o XhifeAzbYcfPJiAqB4SHrPEa9ckfI6NgRshVd9t82yyswJchO8GKKY4HzAC2Pvbf hLGbcukXf3FyYABNNNs/z/OwaZP/nWzgkbkClhvgVr8kqzPszaisgvuvNudqeedg FrjmjoSqvz3h3OqLDUGSQU+mykgMGFgzRUE85tR9sMHaJbAF0OAdS7Yy69EC9O7j 1DPagInoVutoRmwy089BGC3kz9zIjqDU/e4+crgf513PPQw6o45h+aOg1scOWzqO NwG2hUZkKMMm3MxTJXy99zwPzwJzcQN7qkUbpl4gK4+s66RuuM3Bmb3x7VO2NWMD 29vbO+UsvhGTYqiJINwqwybm/q1zirPCpdqCzg6KgF9L From: Bean Huo block_commit_write() always returns 0, this patch changes it to return void. Signed-off-by: Bean Huo --- 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 */ From patchwork Sun Jun 18 21:32:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 13286052 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 aib29ajc248.phx1.oracleemaildelivery.com (aib29ajc248.phx1.oracleemaildelivery.com [192.29.103.248]) (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 324E8C001B3 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=lG2T/FJIByT5VG7I5YhVY0Jwy2klt3itcagU5HAZQgg=; b=Y/emj/0EEXa+Mgg1JbcxiLZd38Mqg92dfXHju/LfzouX7cVxn8PZYHWw4fIW7Gt0u1BeWsNZewNp QQxM6BX204pOXpkR4XQihgLszTQksI/IP9ixBcsXWIDVMv+Oo5PQCQsA9gKyFAvAKBECZgUR7BP5 Sj80TXQfRt4cEm6f4oXngqqg7I74EyincS7KOeuZ+nA83C+r2VN8Jy440V4VsLl8a+iVAysZ2tKd MGklEX+K7MoDsgN97wY+7XSx3Kw/OWuRMpypw6mklIQTAXkzBMlxMysX6M31ZZM5NcQ0NQi2Yh3V S7ObSfl1HhuWiyAM41HZeSZEyn93OgeEPaduAg== 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=lG2T/FJIByT5VG7I5YhVY0Jwy2klt3itcagU5HAZQgg=; b=b6m+kQQgpoZNyDuHkpCOCzjXt2HsUBNFv8RZQp//48V8+blZpTMWzSSsPl4qyw88gdWIvTknJhf9 foTgQnlJsRMgU/t9RbjTyahJiyrYLIGXJI829+Ogi+8TsHjEDAm02lgdpohjyYbJEqiJeABvUwLb uCYzb0XAazDcmnKgoX2DIsE/amKLYxgobNwS7LhqDFsnv2UC+NUJ8B8PJ7dR5EORbCE16VNyoYhN ZUINjpJGHp1CAp7lfoOpXIY0PElLj4wsRCYvnmpqFyekuZN2yjzzm3+0ETrFz1fFGYTdx2U60hk3 bBGUYgkSUp7WOuFlV8QeYI8Nxd48u+4Wfjgx8w== Received: by omta-ad2-fd1-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 <0RWK00FA745YXV90@omta-ad2-fd1-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=1687123986; cv=none; d=strato.com; s=strato-dkim-0002; b=VM4BVadLBxSmWrHdO2AnIMFg3ThohSaWQHyt8CN0gGgrgT5Efki2XHTvsdgrx1ulnu gi1cVRMSfGGBnxqq3Up+SVlG+6HLgZhTJ+pEKilpmwR2A4+BFS9DoFhf3z0sgA8O+SmS +nEEpKuMAaL+L7rzmqyg8GpEFroyX8gqjmMCjftc6+gE0I4cP5FKwRB/GIUme3aNGAjQ Mu9f5JPR+wgaBVmKO0LuS1DA5hLKntZTsVoTvEhI9tQ7B/+gmj9Fq7j6CU+xz3RdGfm7 x01gQu+hPEqCr5fg+ETD82JFu/XYJAIf2k3ebb2hjNJqje57KvmfnK9wwbX2M7wYVRLR fReg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1687123986; 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=6ppbOx/Qif038c3YguD4sRfoT+KAp+bNCu/5t81cezc=; b=Ne0eZfHTFUALLrUFdk+Mulsr50qZ7017Hu6VyizDLMjGT45FpEu8baz/jcu33NlyhR kNT0gTjYuWT5l7lxhTATOY+4uQnJqU4xPyKBmq3d8g895uLh1PuSwXlXH59hZB6Hj/kV /RPpksFyRS9tHYP7tQb2F2wWF39Kay4SpNY2QYV+2SvbGyFx49NKr2KTpco9f5R2erVZ tA38sJhLXJaNmQYypvIRVUgg58TFeSyG3qelpcWjbSpGHLxYWDo1JDk4GopqXW6KvaaJ dJXTHLmnMQCbKYsgWTwtcW9nND/cnQ4Jm8zr6ihU8EY8iQUacB3nzWzq6twRa4qNiZdG 7NnA== ARC-Authentication-results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1687123986; 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=6ppbOx/Qif038c3YguD4sRfoT+KAp+bNCu/5t81cezc=; b=rm1C4aDn5s8p0jiPCSQS5e33N+QMhMYX/pDLrHunRRLY82ZzC79ofe7ts6o6S9db1m Lv7Y5hzySS8uRR66xnJLkU2Sjeyuj8Adcq48IFxbNoq03zd70IyYvmu0Pkd/JfsZhHio 2JMb7GZaAA3fGeds4hxUJieADdqHEeB3ehdTQinwcA3J82eiAGQUgpWU/6speQS27RgD wCMRuwmubaVUc159E62Bm6I9RmJUR5MoHjQLTv2f9hqsvHVNCaKLw8e8ro+CLkRSir1+ Pt6a1MhtQExsqm+6T6TVUNbTmw+FqRMdzeJfiN6csLCKWsVaGLvAEJJwvy097UnGynCk cfIg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1687123986; 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=6ppbOx/Qif038c3YguD4sRfoT+KAp+bNCu/5t81cezc=; b=NvePtc2m2+fdgfTJNzrxCVuc1a5tkuX9Juc9ovSF6j+el0TNLXge5NTjT7AAYUd0kv N5FeFsHWiyo5iEgg0QDg== 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: Sun, 18 Jun 2023 23:32:48 +0200 Message-id: <20230618213250.694110-4-beanhuo@iokpp.de> X-Mailer: git-send-email 2.34.1 In-reply-to: <20230618213250.694110-1-beanhuo@iokpp.de> References: <20230618213250.694110-1-beanhuo@iokpp.de> MIME-version: 1.0 X-Source-IP: 81.169.146.170 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10745 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 mlxscore=0 adultscore=0 priorityscore=0 unknownsenderscore=20 bulkscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxlogscore=881 impostorscore=0 clxscore=86 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306180205 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 v1 3/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/NDXvjDB6pBSedrgBzPc9DUyubU4DD1EQ33bneoxgmq5ARfEwes1hW/CxwfjqKzP/cKnUXGNs35zouFQhI=" X-ServerName: mo4-p02-ob.smtp.rzone.de X-Proofpoint-SPF-Result: None X-Spam: Clean X-Proofpoint-GUID: ForvyZ7dh3Z17C0rYIIcW3Xf3OtdIJZB X-Proofpoint-ORIG-GUID: ForvyZ7dh3Z17C0rYIIcW3Xf3OtdIJZB X-Mailman-Approved-At: Tue, 20 Jun 2023 14:56:20 +0000 Reporting-Meta: AAEruL5YbLIsbriU3ClZK31pcw8ZCPwgKGl9le7FhcWDzqklneNQF04TClkysMsL 8+i18KixXkP0/AI4gzbQ/QbzmvlKnTnPTrOmgnK9L2AvseCuT8UpEc672HyK1a4d frb/YFBwKHmApdzLDRAK86xqVwv4eWlVdZt/xbgZcjoFsnzyDG6qpUR4rcKlNC9/ sqv3qlQvVbWu743yyAfl/meFsyeWBUMqa3bWiMUr2hHwvVoECAiE9V47fMi4ePQm PN5EowgcCPFyVfhoYwKYL8A0HCizRhcW3q3PEeMoV6l1GBE8ti5Yav9rIRUNtlfk S8xlSwustJgIn1GLxGs73Mk0216FMyKOqpAFQG4N5KC5uzZK5pZkcWGhVKiiqeEG 0/ZkhOLPH7D2XVudOjwGw/q0UTyWnkhvcc+0Dcm/VUdC2IEliG7+mxMr1OEv1ucJ QkBqeva89JRZzilpwysh7hDOZI8atWytOcZitI9/e6tjmDwG4XnVqhHfdczp7VZo WeCHTeR6v+bdsKsoBs4xkEaemhrkNV1MGEyqxAujXkyY From: Bean Huo Remove unnecessary check on the return value of block_commit_write(). Signed-off-by: Bean Huo --- 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 Sun Jun 18 21:32:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 13286051 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 F237AEB64DD for ; Tue, 20 Jun 2023 14:56:22 +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=mhtiZlaZZogItZq1GwRHsxOJXJFEhhFb+caz1rSIk/g=; b=1erDZLZ9TWG7e1ywR0gBY8OYyJK+uik5k57jYC9f8QMH6f6NzQ8h58IPoiSPQezYw4xEhEAjDuvd +LId9unC9BN0fm9x6/NP9xHtaZ8aKY11cqUnY0b9ZVSzGTdsU67+65mtAQ2U4PWQOtopyTAg31ez cmx3zAO0lYByPICSnQjcPTYvPvOq8G2IxFxusEoXQwl9W53Hp5HA9m2y/ep8EAgBD+dFVhZPDLkn 1YzVzqJW6VKSGnJIB+UxB89fnf/NUg7q3wcJPdr0R7awoA5sjUA4IeqsyNyuwXRIBxIccijIouWh BfKkS9ov37rA9MoXTR6Jab8yCftruZnnKBtzBA== 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=mhtiZlaZZogItZq1GwRHsxOJXJFEhhFb+caz1rSIk/g=; b=Z0p8V82Cp+Hnhzr/OC0u5MbVbiatKEGwGxIJ1UJ+AzsO0Qx/Fx1P65Ha8MPTvwzrsq6ryg9xzuQI sv+b/6IO6wvjhB0SObv/cgqcFagVvnnzQGqW46lx7H8gnIhiXD2I1FS64DJWXQBytMKx9QRG/OBh PLB1vRbpSwE7+mnqk9bd2dKhA2o9pUG5dmejsYt84w6u3yXBtDou4qpnydXmtFtYCc6+Njih5iKP mAj3co+o7/LqqH2dRnQBUv+F9YoBOC66BmGAGX900N2Tn6Owp9ioDryHOf2BdEtPTvrDfbkcKEhD 9l667dqe5e9ZGsuqrtHEsjNY8j8fnXrILgOM8g== 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 <0RWK0049945YPU10@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=1687123987; cv=none; d=strato.com; s=strato-dkim-0002; b=pLEHJ/bKY0zR7WfVem2YJX11hI5zcyydSYNrxDhLqLUbG2eh5hktn73AF1yxlwqMpY g/ARQjKIM9Lry5xsVby9JTIq4HbhPhyyh2bBtLKJYbUt/CvLVCe7zNdGaWF/TSkISzOw HqDwsUuBXDn4ahcCZqQ576hepzZRQYD6feXBbkVO49mZBNZti/lxcGjBC9YPT/4v/D3B 9GSsOc7VPjYQ7dgyWlukJCLLh++tza2j5IrxgDhrqq+7g86Av4rkvHpsko32TxJ3WclB 4CSTeJw7QSK6fgZs6bh/rfV5idezwMvQ/semvtQtCs+dp0eAOHYbnMW1JSbpoAJmHA3f /9eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1687123987; 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=ByE+GUzwLDG5usz6jIof8CLTzZ6sYXPxh+V91S3i84U=; b=W8l2heUn/qa9X6uxx9qZLX8bsfkjD1TyNpx7NIlB8Gnmr90fhd4c1Sl6boZCyjfeR5 kAD8fr51l2ZvCr2g/uxT6XHmnbgB3TmwkHbzh3fgtHvp23vz23ySCVm7VIQYYVJKll36 ZPKytI+0d0mwhlUcX9UOWBJGM+cTUiSOGAfoLprazJMlzQS3JwnpcFdrfC1R+Fxdsjsu gbjhn+oXinSlWJngIq2ITgzVZh+2VWPCdw/nPgnQOQ6fto20AuNtXnZmxtJ4cmFtULXH x9l+aryDOaA6fKejukojxwupuNGDUw/3dUQx4NC52LyQ8DmwwBSQjiLGrGjYGszvY32r naNg== ARC-Authentication-results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1687123987; 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=ByE+GUzwLDG5usz6jIof8CLTzZ6sYXPxh+V91S3i84U=; b=I/Sam9ubiVNWnsYHM4Uz6c4kDnTzvMysr+UiOj6HJZIkBo+wMoVNH5A/vTf9eYMLoM 13Mqc3UasIbqYpxQ+iuJDkoHvWuKaCy0y765bFXo7cts4FPXEcLIDlATt/O8AVvvtm8+ 4xASk8jV2skvOTGJ2/FFH2MaYWmXGMEcFImuOAuyYx3jitdFoFSXc2V5sYsINEFltzg+ yK3Y14rSsN27mg1HG9aL/iUKcsMD/mNqMY+hWDgz81uxsoxYA/m2FKrk2te4DzI+WWfg 3wtLLUgMcIm1W8pxknPaTRJuaDh5P3T9liRplpwq5UN947Fi6Js8ewuAdNdXmYRPKUki GF7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1687123987; 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=ByE+GUzwLDG5usz6jIof8CLTzZ6sYXPxh+V91S3i84U=; b=R2J1VAchfVBP7IiVOUW+S6F/wiHWLIMM2xxuk2gf6Ug7a0Z5LFWJyXUGOKBW+C16Xy pE9ZAu31RN7r+LTMBFCA== 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: Sun, 18 Jun 2023 23:32:49 +0200 Message-id: <20230618213250.694110-5-beanhuo@iokpp.de> X-Mailer: git-send-email 2.34.1 In-reply-to: <20230618213250.694110-1-beanhuo@iokpp.de> References: <20230618213250.694110-1-beanhuo@iokpp.de> MIME-version: 1.0 X-Source-IP: 81.169.146.170 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10745 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 mlxlogscore=791 priorityscore=0 unknownsenderscore=20 impostorscore=0 mlxscore=0 clxscore=93 spamscore=0 suspectscore=0 phishscore=0 bulkscore=0 malwarescore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306180205 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 v1 4/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/NDXvjDB6pBSedrgBzPc9DUyubU4DD1EQ33bneoxgmq5ARfEwes1hW/CxwfjqKzP/cKnUXGNs35zouFQhI=" X-ServerName: mo4-p02-ob.smtp.rzone.de X-Proofpoint-SPF-Result: None X-Spam: Clean X-Proofpoint-GUID: YMmwQKdkBiG6_CiJoYgH-LeP8oxoWEmQ X-Proofpoint-ORIG-GUID: YMmwQKdkBiG6_CiJoYgH-LeP8oxoWEmQ X-Mailman-Approved-At: Tue, 20 Jun 2023 14:56:20 +0000 Reporting-Meta: AAGSxUH9GD/DCbzHVSj7tRC9ZXJx59aRcMe/JuZEkCI+Muyw6Tx9q68Fo8dYYN1a 061jmYKqH0289pjhOtZwUTTaZhuRSEHvyoc5efniwlqbAuyvYZA+R2IQN+cOEUPO AahDBv2rs65H5wrM4vKYMvxOfgPhalph+rWMifHWpgPbnNjRqIWBZBU0HOWHBxlY OCCPbgNOhtBsbShhM9AYSRncJivvEOJQejgL1siXmwwQrzgxTtFOODSXD6YqRMz7 RrDV98k5WASA1r/u724OHlEjxBQfhnU8A8lAoCq6E9ocBeB/MmeYpORbC+2gxjoc Pa2hs3yi60XWVPUcyheVZ+t9NGlKck8Alp2dsOisR5qmAkvotCYKj7Aj+F09ucRz DiqoJzt5EoFB9uD2IAeROgd+VB5sjBOLCtG0AyUBDl1eKZN1K0lMxuG+hJUQmJpS eJEpL/Zsssx8zz8ZfZo27SOCXIrpddN3AgURKzfYnJJuwKGyF47iuZaUdVuUXKC1 72M2DabzISIKGQeDcUutLRC4rA17x+lsOUluIpUU4mdX From: Bean Huo Remove unnecessary check on the return value of block_commit_write(). Signed-off-by: Bean Huo --- 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 Sun Jun 18 21:32:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 13286053 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 C575FEB64DB for ; Tue, 20 Jun 2023 14:56:22 +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=+6CYa1VxnTnyEoD8Btq5z6zbIHxpTZex7jvcEwo+oYQ=; b=2xF1crSNWhx/kMw7BHGCb3hVh07YFvar04lhSasIZAoTXNIsKciIyk5kKXfPw8r2Z2QjRi2b1NPs e5UA3/dI96h1k1hr7reAbZKLSHnoHqUs9KC2AFHJUFVDRrWTa0TA/2nxQgzC4UrpZJ1u3tEatyP7 QJTnHLu+10Kojf6tW5Bs8ANc8ZfLuhpYD9C/v1HcB7Dt1ereeP6Cyf+LxVHX4uGpEXp35LJTzAOK qFGKV8mHSCTQoHaFKvcEoypeu2AjOAzOoHEB8ad5OjeAdZRlJFB0SDtUTVHf+ie9ihP15Ywdpvy8 tP3jGmkAQETE3LciyrlddyNRC8bGSDu8fYt/1A== 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=+6CYa1VxnTnyEoD8Btq5z6zbIHxpTZex7jvcEwo+oYQ=; b=T0mNfdxa+UHwg2q3X8JHgvCBh0ePkeO0kB8VnCJC6pveCH1J8hch3QtXwRkONpfsBn6wTJC/3UaP /kLF00KEaiml9qMuTZzcrZYUjjWR0V0427MJhFU1dpmYr1lVvZgKhwYCl2ituPUnWaz7zpl6wpH7 oy4Seisf7ZnoJJSE3c8QQnlmJAGocCcpmFxSe/CcMhjWr0MmPtmZArMsprdpu3NyrPhL7pwkCWHv 1nKGnlBUuzHemHzNxmBkEJwNuqtiZ9KcHa5UpD/Zatpm3jFCDRAcKTzjf9fXrohRxM5yOQMecOax lXrT9pNXC2CpcpNC63l2KSLSRKQdI9oSnN/A1g== 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 <0RWK0049145XPU10@omta-ad2-fd3-201-us-phoenix-1.omtaad2.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Tue, 20 Jun 2023 14:56:21 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; t=1687123988; cv=none; d=strato.com; s=strato-dkim-0002; b=tEdXkdk7eABTemTjAU3iVebaYm3Bzh3MWbiQBoyEfdn2aJ2yeIRsy40d61YZQMufmE gqAjOYupLuO2sQ7v0KLbNqbFBG78din/tYVrvJ224Tqx10k4g8WWbn3SbOs8CcopWs0l pbMHLb23pfZT9K9Xl9XQKoyrtlDWQfrOWmbdO6vpEpSalm6Kz3ZdlLDiJPW0/xzHHR6d fNZoZOEKvQ9ITPPJGvcVwYPS5jhXS/91xafwSu0K1IQbA/4ckyi1/iQndKROuK5P4R2j xga3ZGIHDKSyepMGAx+n9OWOfKttP8ye/ZHWu/MtADofar2WEFRTVILO3MTH/SFU7C87 EUqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1687123988; 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=f2kgEMuIUUrHM5gBc5Sm8qQWNSiMWwhC4tlGu4p/URc=; b=mf4ehWkiTNgGioBCJaewTZnI1CdsXpb+P0qZdNlZ5uExOHHr/sHp7Zxxr1HJHRMxsR UpyBn8CHIdbcr2GvduRetEJBlLVVz0kIMCoa3yrPnggf5pPtI3hkgw8c4B/zvB5cHH+p 3WoLtOWkjrPjnvrG1yCS1r9oRveLq8owWXIgI26EuNa0sIrkh1a3X5qIPEcRuUAlWBiP PSy1ynNnPl/i5KD5612T3HyUkpOS/re+MtQXCMyHPtKawIs9ItiMovYSY75AjK8RKr1U LdIJpXk1G40ViTZsZ8YEqNjVMPSntbzT6nhbgB633z/Ve5LrDl34fhD8F0HQ0d/AexPL WtyQ== ARC-Authentication-results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1687123988; 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=f2kgEMuIUUrHM5gBc5Sm8qQWNSiMWwhC4tlGu4p/URc=; b=bahHsnk+VQ49NmAqeLTyYIKH088rJ1bhhGqTig2deRUwdhreH04FLhPBSzPS8x+yfp uPB5yunDDa7hg9ZbQ4mb61q+tnqM851gEjy3lnlnRJUS424IqyqHMEiTXsdCxNksB8C+ 7PQ8fHHwSf/G7IvOFUB5x1BV8pz83J7MBKIr7W24WN3HedKW6h5GEcXW9Ex1CLJfMKA7 XaLTi1mpIRR36fVGHm/DCtarnG2G6ohYongfl0I62htqcG+jwkOL2D0cZeZVM9aFruMI 8b1zfnqRKjrul1Zw+r2MTm+s4VdW+cQat0njR4Xf8YG6RUmOrnxn8LzxLN/GWFJrT/ax X1TQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1687123988; 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=f2kgEMuIUUrHM5gBc5Sm8qQWNSiMWwhC4tlGu4p/URc=; b=dBt5lKWS8dqmRtY3qC7MaiFJqdMJFpEDTtsjzVMd/Pp8QsibX0A12xfWvfoG/iAKeA R8g9/41dk9kwuat6UcAg== 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: Sun, 18 Jun 2023 23:32:50 +0200 Message-id: <20230618213250.694110-6-beanhuo@iokpp.de> X-Mailer: git-send-email 2.34.1 In-reply-to: <20230618213250.694110-1-beanhuo@iokpp.de> References: <20230618213250.694110-1-beanhuo@iokpp.de> MIME-version: 1.0 X-Source-IP: 85.215.255.101 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10745 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 adultscore=0 bulkscore=0 priorityscore=0 clxscore=72 unknownsenderscore=20 mlxscore=0 spamscore=0 malwarescore=0 mlxlogscore=671 impostorscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306180205 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 v1 5/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: mo03 X-RZG-AUTH: ":LmkFe0i9dN8c2t4QQyGBB/NDXvjDB6pBSedrgBzPc9DUyubU4DD1EQ33bneoxgmq5ARfEwes1hW/CxwfjqKzP/cKnUXGNs35zouFQhI=" X-ServerName: mo4-p03-ob.smtp.rzone.de X-Proofpoint-SPF-Result: None X-Spam: Clean X-Proofpoint-ORIG-GUID: yJN801ct9zjzAMtDY2jY1F1QPEPv5VdP X-Proofpoint-GUID: yJN801ct9zjzAMtDY2jY1F1QPEPv5VdP X-Mailman-Approved-At: Tue, 20 Jun 2023 14:56:20 +0000 Reporting-Meta: AAHNECSWBi79Wv0RNZv7GQQmv0noYfTp38F0F9yBFCFU8Fd6qZbTSJRwoqSt+X/8 EJ1GMbD8xVjoRj3JHSFlNyGWGvE5DytYF1PB9PFsBt6eSP+aeNWWwTpv7xWpoKOx jcCUU9fd1F0Cuo80OSfWGBcUjYLWufNXmC4SUQcs94R9DiZy9Z8LAMrZ8bojP+Zg B1GOJt2HBUF7Rc+5QwuF2dhkgn6IHaa+h9LBShVptzbszwsFkCBpIbDsLi0VwS2q ZCkGK99iCpQHUQqPYY6c2k/yfy1tQ+X30V6VG8J9iwqgtluk70deS7GPAi9HbM25 ZNegG3l463oIyaC7YnBQRr6ktJeMvD5vmCO7/I2FEL+HPwZpFe6t1k5oyp2m1sWT wqG4WP7ZgfXs5jNv/evKTBaZeDCikkYarLU/O4GVSsS39+yYQq5ZjX7LJBD/OWK7 g0BdL3HnsRij382d9LB18nrRp+IW4MJWBZPkrOxCjPu5JxIeJmCSVMwnS0sa4Rvt 94nGtCWOSu/4eoKn2hw6XKby2H0ntXMuehqyZnktiX0J From: Bean Huo Remove unnecessary check on the return value of block_commit_write(). Signed-off-by: Bean Huo --- 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);