summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/ext2fs/ext2_linux_balloc.c6
-rw-r--r--sys/gnu/fs/ext2fs/ext2_linux_balloc.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/gnu/ext2fs/ext2_linux_balloc.c b/sys/gnu/ext2fs/ext2_linux_balloc.c
index 8b43e0d..23524ca 100644
--- a/sys/gnu/ext2fs/ext2_linux_balloc.c
+++ b/sys/gnu/ext2fs/ext2_linux_balloc.c
@@ -173,12 +173,13 @@ void ext2_free_blocks (struct mount * mp, unsigned long block,
unsigned long i;
int bitmap_nr;
struct ext2_group_desc * gdp;
- struct ext2_super_block * es = sb->s_es;
+ struct ext2_super_block * es;
if (!sb) {
printf ("ext2_free_blocks: nonexistent device");
return;
}
+ es = sb->s_es;
lock_super (VFSTOEXT2(mp)->um_devvp);
if (block < es->s_first_data_block ||
(block + count) > es->s_blocks_count) {
@@ -257,7 +258,7 @@ int ext2_new_block (struct mount * mp, unsigned long goal,
int i, j, k, tmp;
int bitmap_nr;
struct ext2_group_desc * gdp;
- struct ext2_super_block * es = sb->s_es;
+ struct ext2_super_block * es;
#ifdef EXT2FS_DEBUG
static int goal_hits = 0, goal_attempts = 0;
@@ -266,6 +267,7 @@ int ext2_new_block (struct mount * mp, unsigned long goal,
printf ("ext2_new_block: nonexistent device");
return 0;
}
+ es = sb->s_es;
lock_super (VFSTOEXT2(mp)->um_devvp);
ext2_debug ("goal=%lu.\n", goal);
diff --git a/sys/gnu/fs/ext2fs/ext2_linux_balloc.c b/sys/gnu/fs/ext2fs/ext2_linux_balloc.c
index 8b43e0d..23524ca 100644
--- a/sys/gnu/fs/ext2fs/ext2_linux_balloc.c
+++ b/sys/gnu/fs/ext2fs/ext2_linux_balloc.c
@@ -173,12 +173,13 @@ void ext2_free_blocks (struct mount * mp, unsigned long block,
unsigned long i;
int bitmap_nr;
struct ext2_group_desc * gdp;
- struct ext2_super_block * es = sb->s_es;
+ struct ext2_super_block * es;
if (!sb) {
printf ("ext2_free_blocks: nonexistent device");
return;
}
+ es = sb->s_es;
lock_super (VFSTOEXT2(mp)->um_devvp);
if (block < es->s_first_data_block ||
(block + count) > es->s_blocks_count) {
@@ -257,7 +258,7 @@ int ext2_new_block (struct mount * mp, unsigned long goal,
int i, j, k, tmp;
int bitmap_nr;
struct ext2_group_desc * gdp;
- struct ext2_super_block * es = sb->s_es;
+ struct ext2_super_block * es;
#ifdef EXT2FS_DEBUG
static int goal_hits = 0, goal_attempts = 0;
@@ -266,6 +267,7 @@ int ext2_new_block (struct mount * mp, unsigned long goal,
printf ("ext2_new_block: nonexistent device");
return 0;
}
+ es = sb->s_es;
lock_super (VFSTOEXT2(mp)->um_devvp);
ext2_debug ("goal=%lu.\n", goal);
OpenPOWER on IntegriCloud