diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-18 22:06:10 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-18 22:06:10 +0000 |
commit | aba4e552a2f2c1492441acbccedd8e0a4c53f916 (patch) | |
tree | 23921efb2b4af590160f034a89ff3da2ecca6e47 /fs/qnx4 | |
parent | 9e17e1aa1cf1cb497d2f67147a51831888affcf3 (diff) |
Merge with Linux 2.3.43.
Diffstat (limited to 'fs/qnx4')
-rw-r--r-- | fs/qnx4/bitmap.c | 6 | ||||
-rw-r--r-- | fs/qnx4/dir.c | 4 | ||||
-rw-r--r-- | fs/qnx4/inode.c | 14 |
3 files changed, 10 insertions, 14 deletions
diff --git a/fs/qnx4/bitmap.c b/fs/qnx4/bitmap.c index 141caa2d1..56e7790bb 100644 --- a/fs/qnx4/bitmap.c +++ b/fs/qnx4/bitmap.c @@ -76,16 +76,12 @@ unsigned long qnx4_count_free_blocks(struct super_block *sb) count_bits(bh->b_data, size - total, &total_free); brelse(bh); total += QNX4_BLOCK_SIZE; + offset++; } return total_free; } -unsigned long qnx4_count_free_inodes(struct super_block *sb) -{ - return qnx4_count_free_blocks(sb) * QNX4_INODES_PER_BLOCK; /* FIXME */ -} - #ifdef CONFIG_QNX4FS_RW int qnx4_is_free(struct super_block *sb, long block) diff --git a/fs/qnx4/dir.c b/fs/qnx4/dir.c index 7dd304735..068c56535 100644 --- a/fs/qnx4/dir.c +++ b/fs/qnx4/dir.c @@ -35,13 +35,13 @@ static int qnx4_readdir(struct file *filp, void *dirent, filldir_t filldir) QNX4DEBUG(("filp->f_pos = %ld\n", (long) filp->f_pos)); while (filp->f_pos < inode->i_size) { - blknum = qnx4_block_map( inode, filp->f_pos / QNX4_BLOCK_SIZE ); + blknum = qnx4_block_map( inode, filp->f_pos >> QNX4_BLOCK_SIZE_BITS ); bh = bread(inode->i_dev, blknum, QNX4_BLOCK_SIZE); if(bh==NULL) { printk(KERN_ERR "qnx4_readdir: bread failed (%ld)\n", blknum); break; } - ix = (filp->f_pos / QNX4_DIR_ENTRY_SIZE - (filp->f_pos / QNX4_BLOCK_SIZE) * QNX4_INODES_PER_BLOCK) % QNX4_INODES_PER_BLOCK; + ix = (int)(filp->f_pos >> QNX4_DIR_ENTRY_SIZE_BITS) % QNX4_INODES_PER_BLOCK; while (ix < QNX4_INODES_PER_BLOCK) { offset = ix * QNX4_DIR_ENTRY_SIZE; de = (struct qnx4_inode_entry *) (bh->b_data + offset); diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index 67c9f3d3a..5b70d5211 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c @@ -275,13 +275,13 @@ static int qnx4_statfs(struct super_block *sb, struct statfs tmp; memset(&tmp, 0, sizeof tmp); - tmp.f_type = sb->s_magic; - tmp.f_bsize = sb->s_blocksize; - tmp.f_blocks = le32_to_cpu(sb->u.qnx4_sb.BitMap->di_size) * 8; - tmp.f_bfree = qnx4_count_free_blocks(sb); - tmp.f_bavail = tmp.f_bfree; - tmp.f_files = 0x00; /* change this !!! */ - tmp.f_ffree = qnx4_count_free_inodes(sb); + tmp.f_type = sb->s_magic; + tmp.f_bsize = sb->s_blocksize; + tmp.f_blocks = le32_to_cpu(sb->u.qnx4_sb.BitMap->di_size) * 8; + tmp.f_bfree = qnx4_count_free_blocks(sb); + tmp.f_bavail = tmp.f_bfree; + tmp.f_files = -1; /* we don't count files */ + tmp.f_ffree = -1; /* inodes are allocated dynamically */ tmp.f_namelen = QNX4_NAME_MAX; return copy_to_user(buf, &tmp, bufsize) ? -EFAULT : 0; |