@@ -144,7 +144,6 @@ struct dx_map_entry
144
144
u16 size ;
145
145
};
146
146
147
- #ifdef CONFIG_EXT3_INDEX
148
147
static inline unsigned dx_get_block (struct dx_entry * entry );
149
148
static void dx_set_block (struct dx_entry * entry , unsigned value );
150
149
static inline unsigned dx_get_hash (struct dx_entry * entry );
@@ -768,8 +767,6 @@ static void dx_insert_block(struct dx_frame *frame, u32 hash, u32 block)
768
767
dx_set_block (new , block );
769
768
dx_set_count (entries , count + 1 );
770
769
}
771
- #endif
772
-
773
770
774
771
static void ext3_update_dx_flag (struct inode * inode )
775
772
{
@@ -871,7 +868,6 @@ static struct buffer_head * ext3_find_entry (struct dentry *dentry,
871
868
name = dentry -> d_name .name ;
872
869
if (namelen > EXT3_NAME_LEN )
873
870
return NULL ;
874
- #ifdef CONFIG_EXT3_INDEX
875
871
if (is_dx (dir )) {
876
872
bh = ext3_dx_find_entry (dentry , res_dir , & err );
877
873
/*
@@ -883,7 +879,6 @@ static struct buffer_head * ext3_find_entry (struct dentry *dentry,
883
879
return bh ;
884
880
dxtrace (printk ("ext3_find_entry: dx failed, falling back\n" ));
885
881
}
886
- #endif
887
882
nblocks = dir -> i_size >> EXT3_BLOCK_SIZE_BITS (sb );
888
883
start = EXT3_I (dir )-> i_dir_start_lookup ;
889
884
if (start >= nblocks )
@@ -959,7 +954,6 @@ static struct buffer_head * ext3_find_entry (struct dentry *dentry,
959
954
return ret ;
960
955
}
961
956
962
- #ifdef CONFIG_EXT3_INDEX
963
957
static struct buffer_head * ext3_dx_find_entry (struct dentry * dentry ,
964
958
struct ext3_dir_entry_2 * * res_dir , int * err )
965
959
{
@@ -1027,7 +1021,6 @@ static struct buffer_head * ext3_dx_find_entry(struct dentry *dentry,
1027
1021
dx_release (frames );
1028
1022
return NULL ;
1029
1023
}
1030
- #endif
1031
1024
1032
1025
static struct dentry * ext3_lookup (struct inode * dir , struct dentry * dentry , struct nameidata * nd )
1033
1026
{
@@ -1123,7 +1116,6 @@ static inline void ext3_set_de_type(struct super_block *sb,
1123
1116
de -> file_type = ext3_type_by_mode [(mode & S_IFMT )>>S_SHIFT ];
1124
1117
}
1125
1118
1126
- #ifdef CONFIG_EXT3_INDEX
1127
1119
/*
1128
1120
* Move count entries from end of map between two memory locations.
1129
1121
* Returns pointer to last entry moved.
@@ -1268,7 +1260,6 @@ static struct ext3_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
1268
1260
* error = err ;
1269
1261
return NULL ;
1270
1262
}
1271
- #endif
1272
1263
1273
1264
1274
1265
/*
@@ -1366,7 +1357,6 @@ static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry,
1366
1357
return 0 ;
1367
1358
}
1368
1359
1369
- #ifdef CONFIG_EXT3_INDEX
1370
1360
/*
1371
1361
* This converts a one block unindexed directory to a 3 block indexed
1372
1362
* directory, and adds the dentry to the indexed directory.
@@ -1445,7 +1435,6 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
1445
1435
1446
1436
return add_dirent_to_buf (handle , dentry , inode , de , bh );
1447
1437
}
1448
- #endif
1449
1438
1450
1439
/*
1451
1440
* ext3_add_entry()
@@ -1466,17 +1455,14 @@ static int ext3_add_entry (handle_t *handle, struct dentry *dentry,
1466
1455
struct ext3_dir_entry_2 * de ;
1467
1456
struct super_block * sb ;
1468
1457
int retval ;
1469
- #ifdef CONFIG_EXT3_INDEX
1470
1458
int dx_fallback = 0 ;
1471
- #endif
1472
1459
unsigned blocksize ;
1473
1460
u32 block , blocks ;
1474
1461
1475
1462
sb = dir -> i_sb ;
1476
1463
blocksize = sb -> s_blocksize ;
1477
1464
if (!dentry -> d_name .len )
1478
1465
return - EINVAL ;
1479
- #ifdef CONFIG_EXT3_INDEX
1480
1466
if (is_dx (dir )) {
1481
1467
retval = ext3_dx_add_entry (handle , dentry , inode );
1482
1468
if (!retval || (retval != ERR_BAD_DX_DIR ))
@@ -1485,7 +1471,6 @@ static int ext3_add_entry (handle_t *handle, struct dentry *dentry,
1485
1471
dx_fallback ++ ;
1486
1472
ext3_mark_inode_dirty (handle , dir );
1487
1473
}
1488
- #endif
1489
1474
blocks = dir -> i_size >> sb -> s_blocksize_bits ;
1490
1475
for (block = 0 , offset = 0 ; block < blocks ; block ++ ) {
1491
1476
bh = ext3_bread (handle , dir , block , 0 , & retval );
@@ -1495,11 +1480,9 @@ static int ext3_add_entry (handle_t *handle, struct dentry *dentry,
1495
1480
if (retval != - ENOSPC )
1496
1481
return retval ;
1497
1482
1498
- #ifdef CONFIG_EXT3_INDEX
1499
1483
if (blocks == 1 && !dx_fallback &&
1500
1484
EXT3_HAS_COMPAT_FEATURE (sb , EXT3_FEATURE_COMPAT_DIR_INDEX ))
1501
1485
return make_indexed_dir (handle , dentry , inode , bh );
1502
- #endif
1503
1486
brelse (bh );
1504
1487
}
1505
1488
bh = ext3_append (handle , dir , & block , & retval );
@@ -1511,7 +1494,6 @@ static int ext3_add_entry (handle_t *handle, struct dentry *dentry,
1511
1494
return add_dirent_to_buf (handle , dentry , inode , de , bh );
1512
1495
}
1513
1496
1514
- #ifdef CONFIG_EXT3_INDEX
1515
1497
/*
1516
1498
* Returns 0 for success, or a negative error value
1517
1499
*/
@@ -1646,7 +1628,6 @@ static int ext3_dx_add_entry(handle_t *handle, struct dentry *dentry,
1646
1628
dx_release (frames );
1647
1629
return err ;
1648
1630
}
1649
- #endif
1650
1631
1651
1632
/*
1652
1633
* ext3_delete_entry deletes a directory entry by merging it with the
0 commit comments