diff options
author | Alexander Lobakin <aleksander.lobakin@intel.com> | 2024-03-27 16:23:46 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-04-01 10:49:27 +0100 |
commit | 3f5ef5109f6a054ce58b3bec7214ed76c9cc269f (patch) | |
tree | 106238b4efdb7dc6709328272ce27dd3fc3a912e /fs/ntfs3/ntfs_fs.h | |
parent | c1023f5634b9bfcbfff0dc200245309e3cde9b54 (diff) |
fs/ntfs3: add prefix to bitmap_size() and use BITS_TO_U64()
bitmap_size() is a pretty generic name and one may want to use it for
a generic bitmap API function. At the same time, its logic is
NTFS-specific, as it aligns to the sizeof(u64), not the sizeof(long)
(although it uses ideologically right ALIGN() instead of division).
Add the prefix 'ntfs3_' used for that FS (not just 'ntfs_' to not mix
it with the legacy module) and use generic BITS_TO_U64() while at it.
Suggested-by: Yury Norov <yury.norov@gmail.com> # BITS_TO_U64()
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/ntfs3/ntfs_fs.h')
-rw-r--r-- | fs/ntfs3/ntfs_fs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ntfs3/ntfs_fs.h b/fs/ntfs3/ntfs_fs.h index 79356fd29a14..ea5b5e814e63 100644 --- a/fs/ntfs3/ntfs_fs.h +++ b/fs/ntfs3/ntfs_fs.h @@ -966,9 +966,9 @@ 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); + return BITS_TO_U64(bits) * sizeof(u64); } #define _100ns2seconds 10000000 |