From patchwork Tue Dec 20 19:12:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 35168 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp3143539wrn; Tue, 20 Dec 2022 11:30:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf7jjwnArK4XRETG1bGeluZbM1UZaxO3rKy99Q9AFDz5NVTtLK86FM5uPgCz1p7Pe7507l3i X-Received: by 2002:a05:6a21:168d:b0:ad:79bb:7869 with SMTP id np13-20020a056a21168d00b000ad79bb7869mr44924260pzb.56.1671564628537; Tue, 20 Dec 2022 11:30:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1671564628; cv=pass; d=google.com; s=arc-20160816; b=XvJyPhmCZuZtlOOXz94V91yVevGqBg9B8Db9LxxD8im8wLM/xiGac3Gx9v0eNLj0SS H//0U+pIGeecPX1OsLBGMUHPv0hMVxwDJAJNVwWBrvRuy/+EaEAa7LueRAjNkClMVldZ ZuhO2BzT6hhwj1pKGnXgzVTBqcDRtxxS+PQs4XGl7aJ5yrt7Ptq3xgGfE92M4BkuDk0+ v1gEDDTSaABuQqQteUOvqBWqiozmvdhPnSnHO+MTMEZrVJgXifi2edVEZosj/DK47LP+ oewJe+M86gVxVm5bKrwBOa/wV70OEc+gsgMuc6awvRDo3tmeBS8P7u/a54BpbtUik6jZ rTxA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=kYlb+VvQ45px35aMZ1Gi7MA3009LbaQNL6M02U86kIM=; b=wMOA5OpjNJSNU9Tf/xgSI1PJKmly+o0ckradxXZLArRscpflU5fDK+ttq7OEjsQAiI 5nU7tuzGVCwO6j9uICrE+aVdtuv8k3TW3L/+9rWd2re0h5B6ymQ3a6qdU8OuOwp9H037 TMuHBFS+2YV0ZTxoPt58+bE22fXfj9vGjPG1zp3Q5LYSZS65PU248GZvUtnrtK+p3dH9 CXTqHZioJnBCt1fUOj0gcJamn1yrFhp4DRQjSKW3QRd0zh1QOIdVXtj5fvB50JPfY8gP p1BrpjBxkzHiLqzRFdti2o1GVQYePaMPGYNWvt8b5nXRN3AZSbdsWw2CNmvK6+NEaPOO ZbKQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UyBaq1bO; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q23-20020a656857000000b004794d65bc1esi14255132pgt.399.2022.12.20.11.30.15; Tue, 20 Dec 2022 11:30:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@vivo.com header.s=selector2 header.b=UyBaq1bO; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233890AbiLTTM3 (ORCPT + 99 others); Tue, 20 Dec 2022 14:12:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbiLTTM1 (ORCPT ); Tue, 20 Dec 2022 14:12:27 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2114.outbound.protection.outlook.com [40.107.117.114]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E42EE1BE8E for ; Tue, 20 Dec 2022 11:12:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iRquStp6BCtUwjjM09IL7AekjV5WVzciTOVIRhkPCUFHcrEm8mDc/MAbJ/JzVRILDKNtAkMQJFSBZs9A0zoehm1WCpRW0XJATgoKG/BPGDxhFu9sdB2FOeNpsjRGW1aY6hJ1pORSUWTzvFxpHMYhOcHEP617djXh5yUBgLgxcBYvJyiACrt32J8jj3tk+BzWFUSorSaZfgoZzBxuuQX31jxvUdOsdKlSd0ybqjNK0tBL1gq8rmrTIAhWJ3jVylEF3FYNycuWHJxXC20sSap8tNeKL7n9Gn9uizqi/ckrFAivXvwTf2BroQ0UTAFmNt8Ovq756xQqAnQkJh23WWJ/mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kYlb+VvQ45px35aMZ1Gi7MA3009LbaQNL6M02U86kIM=; b=YQLnIsx7wdwlGzoX0BSabQXd0LApvXbIaQRkrrwUAoR5eu6qnROb/M/OGQTjTRj56dtqIPmkwWTdJ2GHG8ErbNv8jHRyHOYziXxnOGZpeUPXC/ZxCtZ4avQFo10zNZ6y0bQ/EoKqmanIBiGxRV6j2Brvgcjoov8OgyofTMzgxSYkD3xQ8AqmckUeyWaYapsyxFrxllH/ttDI1OP+Womt3udbkMs3Z0zHy8BMhlFS84DeWz01bPGL3VOTjX9CrA1etcztH6PverFqUInbJ1mDy0Pjz3OR39SFteUnSZUx6DAPgUkFn1qWJta4bG1WFM+mieo6fhVpi/CeKo7u98lIkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kYlb+VvQ45px35aMZ1Gi7MA3009LbaQNL6M02U86kIM=; b=UyBaq1bOZmqyMAygQ41weTOpsNwfjSjV3p5L/EocUzPMmtwaBl0YG0do1dQ2srKs6o2yMUduyS8X16+SSNXiQG8HbCLkG6aSb5szgiXoVxUTl8mdo0OpiqQJgqPof5X7/b0e2HfIVNLe1FvYmISDbWoiaL5DmWzVQwgVXpp1BlvhCSJsw9rXsAT3tWJvjnj1BV6p8qxj+Ee54vibsszFLLHIxaEhPWx4W82m1bfH1iN6z1fblaQCJazQoWpbFFDC8Abw1JgPH/Urm671ig0s2EdzK2TKzRXRkk9rkL1Pqd7DEbMduMKQUP1X6N9mLISEEVxTsPoEwAiRdBaThRwefA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEZPR06MB5786.apcprd06.prod.outlook.com (2603:1096:101:ac::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Tue, 20 Dec 2022 19:12:22 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::ef03:cbfb:f8ef:d88b]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::ef03:cbfb:f8ef:d88b%9]) with mapi id 15.20.5924.016; Tue, 20 Dec 2022 19:12:22 +0000 From: Yangtao Li To: jaegeuk@kernel.org, chao@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Yangtao Li Subject: [PATCH] f2fs: add a f2fs_ prefix to punch_hole() and expand_inode_data() Date: Wed, 21 Dec 2022 03:12:12 +0800 Message-Id: <20221220191212.58042-1-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 X-ClientProxiedBy: SG2PR06CA0201.apcprd06.prod.outlook.com (2603:1096:4:1::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5786:EE_ X-MS-Office365-Filtering-Correlation-Id: e3d1cb86-61fc-4687-eab5-08dae2be1f43 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vm0AZnLtYiEhBs61BIZJJrEI3RDtJxAzUyFCYf4Nax1zLyfUumfZDzWMSw7XZJ33MsQvvXz9X3MbrY854euGsxKdLM+P59hBlgBTzymsXpmcRfqtpb3QLF474Qp27cGGy/SAgpN8nPY5upju7GaHE3mOAKgi+eQBKzJd2G8cHS0UgqOBQNsHcbscE+XkJOtIczI8dg1Fpddni0ayBCnNa/WuRjhWTCmVSCx3g8dcKXwl5B0dh3hFvsJ71KXkgAq9eDX+7CATaVw85D1Cu6BXCLbSrygpDueLNVhA4da+uN6SEPBbpGKUQJQv3RUMZ4lO0hLumpVmm8mRIamkGNdpDB/HVzJkT/KovJzPxsENDbdaKIJYWhezMfnhVIDRnLxxig9Wy+tdrWfNyYszCG+U+ZGz+GdBxNmeCpTfSuUG62/1kJOYHKD+M4LX67Oe7pnqYvYW37tsdXbVSKObGR1cpOzat68B8bCQRf2hBQSKe+BLfCeZ8U72u2d4CFkz3VlwEnaDTrdScGBzO17v/s5nKTXLblnHY3hvOfExuhiJ5BLV1Xpdt+J4IDIQSbz/R3JjZw7VDTWOhH8TSYRKHmeFvQQ0HSgIRFERXOPoqSRyDR1wSounPkgILCkHyNbO2xFjHbt2Xix9apktCp9D47TsB8d9ZZByGtabpCjWHQhuUmOOcLVB+78OBOrJS9AclL849L51g6yUswVzOXFdvtRAtQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(366004)(376002)(396003)(346002)(136003)(451199015)(83380400001)(41300700001)(2906002)(8936002)(36756003)(38350700002)(86362001)(38100700002)(6506007)(186003)(478600001)(5660300002)(6486002)(6512007)(26005)(52116002)(66476007)(66946007)(2616005)(316002)(6666004)(8676002)(4326008)(66556008)(107886003)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ua0C6Fiu2HYiRwy5vSnULE8DAWFpAR5UprPl1RhG2a+KVa/Y8MYKlINWF4b2qBTzgQf9diZIWWSjHFVXyMLTJf+4R2fp5i92AQvIaDeBF/jQsGecFF+knjzLkTVQFlJiT3a5Tis2Iv8CJjj4VAJTT0P9k7+Pv4QbjVAVzsC3nyNDo4KkDQP/gN8jjA5iDw9+o4paXnTffjZ8yRv8b8IjKOgECUJS1w/vH/yrfR0vdBwZNJZYdqIgPtLnKtrH1S+ZpOpqzDKFSghhiFMy6sWkq3EzPZFDk+R6g8I0LKo9Fzs+LZT0zvOtj0F0RcCke3WA/fpdb/kKphc8JT8n7t51j+QL0y3zQvbvOyb2YLhcmBOWE09R022qm8FLQeacT+3VtAk/Pf5dSjqlbwRH9YXzGTqFqRLIO0J/3RybqlG3AJ7rJvUm0vEUuKmkrxQNnlJy1b5kpbbtMlDxEcyFa7uWmdOY6jI3BbvKImW5tGTqVp2tyXN1ljQgDBDO3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ssrjA6ginu9kBClDdCLzr6l3 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3d1cb86-61fc-4687-eab5-08dae2be1f43 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2022 19:12:22.3648 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Y7s6aXnxih4Y7dvwsURV2U/m49MKsL5hdOJDjHGO2Qg7XCAI1qvfDAhBUouNppMZoSZlgijfiKzuJ8sbUFvjuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5786 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752762552374381282?= X-GMAIL-MSGID: =?utf-8?q?1752762552374381282?= For example, f2fs_collapse_range(), f2fs_collapse_range(), f2fs_insert_range(), the functions used in f2fs_fallocate() are all prefixed with f2fs_, so let's keep the name consistent. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu --- fs/f2fs/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index ecbc8c135b49..d5371951b14c 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1112,7 +1112,7 @@ int f2fs_truncate_hole(struct inode *inode, pgoff_t pg_start, pgoff_t pg_end) return 0; } -static int punch_hole(struct inode *inode, loff_t offset, loff_t len) +static int f2fs_punch_hole(struct inode *inode, loff_t offset, loff_t len) { pgoff_t pg_start, pg_end; loff_t off_start, off_end; @@ -1684,7 +1684,7 @@ static int f2fs_insert_range(struct inode *inode, loff_t offset, loff_t len) return ret; } -static int expand_inode_data(struct inode *inode, loff_t offset, +static int f2fs_expand_inode_data(struct inode *inode, loff_t offset, loff_t len, int mode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); @@ -1832,7 +1832,7 @@ static long f2fs_fallocate(struct file *file, int mode, if (offset >= inode->i_size) goto out; - ret = punch_hole(inode, offset, len); + ret = f2fs_punch_hole(inode, offset, len); } else if (mode & FALLOC_FL_COLLAPSE_RANGE) { ret = f2fs_collapse_range(inode, offset, len); } else if (mode & FALLOC_FL_ZERO_RANGE) { @@ -1840,7 +1840,7 @@ static long f2fs_fallocate(struct file *file, int mode, } else if (mode & FALLOC_FL_INSERT_RANGE) { ret = f2fs_insert_range(inode, offset, len); } else { - ret = expand_inode_data(inode, offset, len, mode); + ret = f2fs_expand_inode_data(inode, offset, len, mode); } if (!ret) {