Commit 59e315b4 authored by Theodore Ts'o's avatar Theodore Ts'o

ext3/4: Fix loop index in do_split() so it is signed

This fixes a gcc warning but it doesn't appear able to result in a
failure, since the primary way the loop is exited is the first
conditional in the for loop, and at least for a consistent filesystem,
the signed/unsigned should in practice never be exposed.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent f99b2589
...@@ -1161,9 +1161,9 @@ static struct ext3_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, ...@@ -1161,9 +1161,9 @@ static struct ext3_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
u32 hash2; u32 hash2;
struct dx_map_entry *map; struct dx_map_entry *map;
char *data1 = (*bh)->b_data, *data2; char *data1 = (*bh)->b_data, *data2;
unsigned split, move, size, i; unsigned split, move, size;
struct ext3_dir_entry_2 *de = NULL, *de2; struct ext3_dir_entry_2 *de = NULL, *de2;
int err = 0; int err = 0, i;
bh2 = ext3_append (handle, dir, &newblock, &err); bh2 = ext3_append (handle, dir, &newblock, &err);
if (!(bh2)) { if (!(bh2)) {
......
...@@ -1171,9 +1171,9 @@ static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, ...@@ -1171,9 +1171,9 @@ static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
u32 hash2; u32 hash2;
struct dx_map_entry *map; struct dx_map_entry *map;
char *data1 = (*bh)->b_data, *data2; char *data1 = (*bh)->b_data, *data2;
unsigned split, move, size, i; unsigned split, move, size;
struct ext4_dir_entry_2 *de = NULL, *de2; struct ext4_dir_entry_2 *de = NULL, *de2;
int err = 0; int err = 0, i;
bh2 = ext4_append (handle, dir, &newblock, &err); bh2 = ext4_append (handle, dir, &newblock, &err);
if (!(bh2)) { if (!(bh2)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment