Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp50944imk; Sat, 2 Jul 2022 11:30:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vl4x8Z2jFILzAvl4uPHd9NaFiCN4f63aN6V2UFQyvdEqexQgL81yyMaKfcex4uri0OnZwR X-Received: by 2002:a17:902:ab8a:b0:16a:4521:a7b7 with SMTP id f10-20020a170902ab8a00b0016a4521a7b7mr27142832plr.57.1656786633137; Sat, 02 Jul 2022 11:30:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656786633; cv=none; d=google.com; s=arc-20160816; b=ZGITRTCWFQC3Sr/Gfy9ED+a8fUbD/+jl6UauXhRfbRJARTMI0nciSbKgfCXjZdiDIc WR4HnPISv/QaXrKNLnipcI3c+xagZzLJ7dUNL1k3WMdPj0m1JWQw1jOW/HMbCwHJmZWz zICJlFDd0H4YXzzysl6cRLGow2vvw0bKtjMWkd5miuF/xvbXt3mbbzSiYsDGX5tLeLZt E1kEtDnZdYiQEsmhiBs/xCn828TMIAVKQHfO2Odljx5QB02eOn2S0eg5xkhfSA6/BF9H +VTVN8e8btmgnlSfJxOP03zbTA38uOAN7HGsaArF8LzC5zcEdx8QuITw0HqtyVq66PKS 1uEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=wVpFEU3jKMJH60432a1NHmhS6xkfRq/8ga9H5oqQiRU=; b=fwMOUHKF1fKNfogPFpCfe3QuaE3mQ9YoH7Uf6RWmjbRWuApD00RT2JwzhGBFJaL1GO D7JcD3bFZe1C0DyfVkmLy4L//3+OG3k9lDvzcBQG3LMNea+2YnVp364wtoNGVY7HxaOT nGwEmcO9OyBn7Ws3FKKEfCQByOOWTUOAjyRuJ7ZOPU1TBYJ+xNozLEstKzvC4Qkm5rpw GFL52ZbRuhjk/G7HbukFFhFlEI0Nl1Cz2+r/n+eg2Bm6H3DUp3vXqvtdK6qN1Tq8fNH3 cM3h4p1UeKQZwfyRE2Fc3xWgUhCa9+MZ0uCSFFXM8/++WQuY+FmiZAf8gU42WQEl1KGc /23w== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t71-20020a63814a000000b0040ca6d2f53asi15185704pgd.572.2022.07.02.11.30.20; Sat, 02 Jul 2022 11:30:33 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232395AbiGBS3i (ORCPT + 99 others); Sat, 2 Jul 2022 14:29:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232322AbiGBS3d (ORCPT ); Sat, 2 Jul 2022 14:29:33 -0400 Received: from smtp.smtpout.orange.fr (smtp06.smtpout.orange.fr [80.12.242.128]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60E6ADED2 for ; Sat, 2 Jul 2022 11:29:32 -0700 (PDT) Received: from pop-os.home ([90.11.190.129]) by smtp.orange.fr with ESMTPA id 7hs0oEF0sWo1m7hs1ouSBQ; Sat, 02 Jul 2022 20:29:30 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sat, 02 Jul 2022 20:29:30 +0200 X-ME-IP: 90.11.190.129 From: Christophe JAILLET To: agk@redhat.com, snitzer@kernel.org, dm-devel@redhat.com, vneethv@linux.ibm.com, oberpar@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, almaz.alexandrovich@paragon-software.com, yury.norov@gmail.com, andriy.shevchenko@linux.intel.com, linux@rasmusvillemoes.dk Cc: linux-s390@vger.kernel.org, ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 2/4] fs/ntfs3: Rename bitmap_size() as ntfs3_bitmap_size() Date: Sat, 2 Jul 2022 20:29:27 +0200 Message-Id: <56a3cb896ec446ca24e4756042d9f0829afc671a.1656785856.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,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-kernel@vger.kernel.org In order to introduce a bitmap_size() function in the bitmap API, we have to rename functions with a similar name. Add a "ntfs3_" prefix and change bitmap_size() into ntfs3_bitmap_size(). No functional change. Signed-off-by: Christophe JAILLET --- fs/ntfs3/bitmap.c | 4 ++-- fs/ntfs3/fsntfs.c | 2 +- fs/ntfs3/index.c | 6 +++--- fs/ntfs3/ntfs_fs.h | 2 +- fs/ntfs3/super.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/ntfs3/bitmap.c b/fs/ntfs3/bitmap.c index e3b5680fd516..f98327453d83 100644 --- a/fs/ntfs3/bitmap.c +++ b/fs/ntfs3/bitmap.c @@ -661,7 +661,7 @@ int wnd_init(struct wnd_bitmap *wnd, struct super_block *sb, size_t nbits) wnd->total_zeroes = nbits; wnd->extent_max = MINUS_ONE_T; wnd->zone_bit = wnd->zone_end = 0; - wnd->nwnd = bytes_to_block(sb, bitmap_size(nbits)); + wnd->nwnd = bytes_to_block(sb, ntfs3_bitmap_size(nbits)); wnd->bits_last = nbits & (wbits - 1); if (!wnd->bits_last) wnd->bits_last = wbits; @@ -1323,7 +1323,7 @@ int wnd_extend(struct wnd_bitmap *wnd, size_t new_bits) return -EINVAL; /* Align to 8 byte boundary. */ - new_wnd = bytes_to_block(sb, bitmap_size(new_bits)); + new_wnd = bytes_to_block(sb, ntfs3_bitmap_size(new_bits)); new_last = new_bits & (wbits - 1); if (!new_last) new_last = wbits; diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c index 3de5700a9b83..9c74d88ce0f0 100644 --- a/fs/ntfs3/fsntfs.c +++ b/fs/ntfs3/fsntfs.c @@ -493,7 +493,7 @@ static int ntfs_extend_mft(struct ntfs_sb_info *sbi) ni->mi.dirty = true; /* Step 2: Resize $MFT::BITMAP. */ - new_bitmap_bytes = bitmap_size(new_mft_total); + new_bitmap_bytes = ntfs3_bitmap_size(new_mft_total); err = attr_set_size(ni, ATTR_BITMAP, NULL, 0, &sbi->mft.bitmap.run, new_bitmap_bytes, &new_bitmap_bytes, true, NULL); diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c index 84ccc1409874..5c5ea05a5ef1 100644 --- a/fs/ntfs3/index.c +++ b/fs/ntfs3/index.c @@ -1353,7 +1353,7 @@ static int indx_create_allocate(struct ntfs_index *indx, struct ntfs_inode *ni, alloc->nres.valid_size = alloc->nres.data_size = cpu_to_le64(data_size); - err = ni_insert_resident(ni, bitmap_size(1), ATTR_BITMAP, in->name, + err = ni_insert_resident(ni, ntfs3_bitmap_size(1), ATTR_BITMAP, in->name, in->name_len, &bitmap, NULL, NULL); if (err) goto out2; @@ -1415,7 +1415,7 @@ static int indx_add_allocate(struct ntfs_index *indx, struct ntfs_inode *ni, if (bmp) { /* Increase bitmap. */ err = attr_set_size(ni, ATTR_BITMAP, in->name, in->name_len, - &indx->bitmap_run, bitmap_size(bit + 1), + &indx->bitmap_run, ntfs3_bitmap_size(bit + 1), NULL, true, NULL); if (err) goto out1; @@ -1973,7 +1973,7 @@ static int indx_shrink(struct ntfs_index *indx, struct ntfs_inode *ni, if (err) return err; - bpb = bitmap_size(bit); + bpb = ntfs3_bitmap_size(bit); if (bpb * 8 == nbits) return 0; diff --git a/fs/ntfs3/ntfs_fs.h b/fs/ntfs3/ntfs_fs.h index 55d686e3c4ec..85210e610a3a 100644 --- a/fs/ntfs3/ntfs_fs.h +++ b/fs/ntfs3/ntfs_fs.h @@ -945,7 +945,7 @@ static inline bool run_is_empty(struct runs_tree *run) } /* NTFS uses quad aligned bitmaps. */ -static inline size_t bitmap_size(size_t bits) +static inline size_t ntfs3_bitmap_size(size_t bits) { return ALIGN((bits + 7) >> 3, 8); } diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index b41d7c824a50..7d48f886ac82 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -1101,7 +1101,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc) /* Check bitmap boundary. */ tt = sbi->used.bitmap.nbits; - if (inode->i_size < bitmap_size(tt)) { + if (inode->i_size < ntfs3_bitmap_size(tt)) { err = -EINVAL; goto put_inode_out; } -- 2.34.1