patch-2.3.3 linux/fs/hpfs/super.c
Next file: linux/fs/minix/namei.c
Previous file: linux/fs/hpfs/namei.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Sun May 16 10:27:40 1999
- Orig file:
v2.3.2/linux/fs/hpfs/super.c
- Orig date:
Sat May 15 23:46:04 1999
diff -u --recursive --new-file v2.3.2/linux/fs/hpfs/super.c linux/fs/hpfs/super.c
@@ -105,7 +105,7 @@
MOD_DEC_USE_COUNT;
}
-static unsigned count_one_bitmap(struct super_block *s, secno secno)
+unsigned hpfs_count_one_bitmap(struct super_block *s, secno secno)
{
struct quad_buffer_head qbh;
unsigned *bits;
@@ -114,6 +114,7 @@
count = 0;
for (i = 0; i < 2048 / sizeof(unsigned); i++) {
unsigned b;
+ if (!bits[i]) continue;
for (b = bits[i]; b; b>>=1) count += b & 1;
}
hpfs_brelse4(&qbh);
@@ -126,7 +127,7 @@
n_bands = (s->s_hpfs_fs_size + 0x3fff) >> 14;
count = 0;
for (n = 0; n < n_bands; n++)
- count += count_one_bitmap(s, s->s_hpfs_bmp_dir[n]);
+ count += hpfs_count_one_bitmap(s, s->s_hpfs_bmp_dir[n]);
return count;
}
@@ -135,7 +136,7 @@
struct statfs tmp;
/*if (s->s_hpfs_n_free == -1) {*/
s->s_hpfs_n_free = count_bitmaps(s);
- s->s_hpfs_n_free_dnodes = count_one_bitmap(s, s->s_hpfs_dmap);
+ s->s_hpfs_n_free_dnodes = hpfs_count_one_bitmap(s, s->s_hpfs_dmap);
/*}*/
tmp.f_type = s->s_magic;
tmp.f_bsize = 512;
@@ -379,7 +380,8 @@
s->s_hpfs_cp_table = NULL;
s->s_hpfs_creation_de_lock = s->s_hpfs_rd_inode = 0;
- s->s_hpfs_creation_de = s->s_hpfs_iget_q = NULL;
+ init_waitqueue_head(&s->s_hpfs_creation_de);
+ init_waitqueue_head(&s->s_hpfs_iget_q);
uid = current->uid;
gid = current->gid;
@@ -540,7 +542,7 @@
root_dno = hpfs_fnode_dno(s, s->s_hpfs_root);
if (root_dno)
- de = map_dirent(s->s_root->d_inode, root_dno, "\001\001", 2, NULL, &qbh, NULL);
+ de = map_dirent(s->s_root->d_inode, root_dno, "\001\001", 2, NULL, &qbh);
if (!root_dno || !de) hpfs_error(s, "unable to find root dir");
else {
s->s_root->d_inode->i_atime = local_to_gmt(s, de->read_date);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)