|
@@ -247,7 +247,7 @@ static int linear_search_in_dir_item(struct cpu_key *key,
|
|
/* mark, that this generation number is used */
|
|
/* mark, that this generation number is used */
|
|
if (de->de_gen_number_bit_string)
|
|
if (de->de_gen_number_bit_string)
|
|
set_bit(GET_GENERATION_NUMBER(deh_offset(deh)),
|
|
set_bit(GET_GENERATION_NUMBER(deh_offset(deh)),
|
|
- (unsigned long *)de->de_gen_number_bit_string);
|
|
|
|
|
|
+ de->de_gen_number_bit_string);
|
|
|
|
|
|
// calculate pointer to name and namelen
|
|
// calculate pointer to name and namelen
|
|
de->de_entry_num = i;
|
|
de->de_entry_num = i;
|
|
@@ -431,7 +431,7 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th,
|
|
struct reiserfs_de_head *deh;
|
|
struct reiserfs_de_head *deh;
|
|
INITIALIZE_PATH(path);
|
|
INITIALIZE_PATH(path);
|
|
struct reiserfs_dir_entry de;
|
|
struct reiserfs_dir_entry de;
|
|
- int bit_string[MAX_GENERATION_NUMBER / (sizeof(int) * 8) + 1];
|
|
|
|
|
|
+ DECLARE_BITMAP(bit_string, MAX_GENERATION_NUMBER + 1);
|
|
int gen_number;
|
|
int gen_number;
|
|
char small_buf[32 + DEH_SIZE]; /* 48 bytes now and we avoid kmalloc
|
|
char small_buf[32 + DEH_SIZE]; /* 48 bytes now and we avoid kmalloc
|
|
if we create file with short name */
|
|
if we create file with short name */
|
|
@@ -486,7 +486,7 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th,
|
|
|
|
|
|
/* find the proper place for the new entry */
|
|
/* find the proper place for the new entry */
|
|
memset(bit_string, 0, sizeof(bit_string));
|
|
memset(bit_string, 0, sizeof(bit_string));
|
|
- de.de_gen_number_bit_string = (char *)bit_string;
|
|
|
|
|
|
+ de.de_gen_number_bit_string = bit_string;
|
|
retval = reiserfs_find_entry(dir, name, namelen, &path, &de);
|
|
retval = reiserfs_find_entry(dir, name, namelen, &path, &de);
|
|
if (retval != NAME_NOT_FOUND) {
|
|
if (retval != NAME_NOT_FOUND) {
|
|
if (buffer != small_buf)
|
|
if (buffer != small_buf)
|
|
@@ -508,7 +508,7 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th,
|
|
}
|
|
}
|
|
|
|
|
|
gen_number =
|
|
gen_number =
|
|
- find_first_zero_bit((unsigned long *)bit_string,
|
|
|
|
|
|
+ find_first_zero_bit(bit_string,
|
|
MAX_GENERATION_NUMBER + 1);
|
|
MAX_GENERATION_NUMBER + 1);
|
|
if (gen_number > MAX_GENERATION_NUMBER) {
|
|
if (gen_number > MAX_GENERATION_NUMBER) {
|
|
/* there is no free generation number */
|
|
/* there is no free generation number */
|