Skip to content

Commit 97a6815

Browse files
fs/ntfs3: Use ALIGN kernel macro
This way code will be more readable. Signed-off-by: Konstantin Komarov <[email protected]>
1 parent e31195a commit 97a6815

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

fs/ntfs3/fsntfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ static int ntfs_extend_mft(struct ntfs_sb_info *sbi)
503503
struct ATTRIB *attr;
504504
struct wnd_bitmap *wnd = &sbi->mft.bitmap;
505505

506-
new_mft_total = (wnd->nbits + MFT_INCREASE_CHUNK + 127) & (CLST)~127;
506+
new_mft_total = ALIGN(wnd->nbits + NTFS_MFT_INCREASE_STEP, 128);
507507
new_mft_bytes = (u64)new_mft_total << sbi->record_bits;
508508

509509
/* Step 1: Resize $MFT::DATA. */

fs/ntfs3/ntfs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ typedef u32 CLST;
8484

8585
#define COMPRESSION_UNIT 4
8686
#define COMPRESS_MAX_CLUSTER 0x1000
87-
#define MFT_INCREASE_CHUNK 1024
8887

8988
enum RECORD_NUM {
9089
MFT_REC_MFT = 0,

fs/ntfs3/ntfs_fs.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ struct ntfs_index {
199199

200200
/* Minimum MFT zone. */
201201
#define NTFS_MIN_MFT_ZONE 100
202+
/* Step to increase the MFT. */
203+
#define NTFS_MFT_INCREASE_STEP 1024
202204

203205
/* Ntfs file system in-core superblock data. */
204206
struct ntfs_sb_info {

0 commit comments

Comments
 (0)