summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/efs/dir.c6
-rw-r--r--fs/efs/inode.c12
-rw-r--r--fs/efs/namei.c10
3 files changed, 10 insertions, 18 deletions
diff --git a/fs/efs/dir.c b/fs/efs/dir.c
index 88e181690..20d3c853e 100644
--- a/fs/efs/dir.c
+++ b/fs/efs/dir.c
@@ -48,7 +48,6 @@ struct inode_operations efs_dir_inode_operations = {
static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) {
struct inode *inode = filp->f_dentry->d_inode;
- struct efs_inode_info *ini = INODE_INFO(inode);
struct buffer_head *bh;
struct efs_dir *dirblock;
@@ -61,9 +60,6 @@ static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) {
if (!inode || !S_ISDIR(inode->i_mode))
return -EBADF;
- if (ini->numextents != 1)
- printk("EFS: WARNING: readdir(): more than one extent\n");
-
if (inode->i_size & (EFS_DIRBSIZE-1))
printk("EFS: WARNING: readdir(): directory size not a multiple of EFS_DIRBSIZE\n");
@@ -104,7 +100,7 @@ static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) {
nameptr = dirslot->name;
#ifdef DEBUG
- printk("EFS: readdir(): block %d slot %d/%d: inode %u, name \"%s\", namelen %u\n", block, slot, dirblock->slots, inodenum, nameptr, namelen);
+ printk("EFS: readdir(): block %d slot %d/%d: inode %u, name \"%s\", namelen %u\n", block, slot, dirblock->slots-1, inodenum, nameptr, namelen);
#endif
if (namelen > 0) {
/* found the next entry */
diff --git a/fs/efs/inode.c b/fs/efs/inode.c
index 893af40ec..9f53f2a7d 100644
--- a/fs/efs/inode.c
+++ b/fs/efs/inode.c
@@ -85,17 +85,17 @@ void efs_read_inode(struct inode *inode) {
}
/*
- * BUG: irix devices are 32-bits. linux devices are only 16-bits.
+ * BUG: irix dev_t is 32-bits. linux dev_t is only 16-bits.
*
- * apparently linux will change to 32-bit devices sometime during
+ * apparently linux will change to 32-bit dev_t sometime during
* linux 2.3.
*
* as is, this code maps devices that can't be represented in
* 16-bits (ie major > 255 or minor > 255) to major = minor = 255.
*
- * during 2.3 when 32-bit devices become available, we should test
+ * during 2.3 when 32-bit dev_t become available, we should test
* to see whether odev contains 65535. if this is the case then we
- * should do device = be32_to_cpu(efs_inode->di_u.di_dev.ndec).
+ * should then do device = be32_to_cpu(efs_inode->di_u.di_dev.ndev).
*/
device = be16_to_cpu(efs_inode->di_u.di_dev.odev);
@@ -116,8 +116,8 @@ void efs_read_inode(struct inode *inode) {
brelse(bh);
#ifdef DEBUG
- printk("EFS: read_inode(): inode %lu, extents %d\n",
- inode->i_ino, in->numextents);
+ printk("EFS: read_inode(): inode %lu, extents %d, mode %o\n",
+ inode->i_ino, in->numextents, inode->i_mode);
#endif
switch (inode->i_mode & S_IFMT) {
diff --git a/fs/efs/namei.c b/fs/efs/namei.c
index 0a70c181f..0684cc4d1 100644
--- a/fs/efs/namei.c
+++ b/fs/efs/namei.c
@@ -9,7 +9,6 @@
#include <linux/efs_fs.h>
static efs_ino_t efs_find_entry(struct inode *inode, const char *name, int len) {
- struct efs_inode_info *in = INODE_INFO(inode);
struct buffer_head *bh;
int slot, namelen;
@@ -19,15 +18,12 @@ static efs_ino_t efs_find_entry(struct inode *inode, const char *name, int len)
efs_ino_t inodenum;
efs_block_t block;
- if (in->numextents != 1)
- printk("EFS: WARNING: find_entry(): more than one extent\n");
-
- if (inode->i_size & (EFS_BLOCKSIZE-1))
- printk("EFS: WARNING: find_entry(): directory size not a multiple of EFS_BLOCKSIZE\n");
+ if (inode->i_size & (EFS_DIRBSIZE-1))
+ printk("EFS: WARNING: find_entry(): directory size not a multiple of EFS_DIRBSIZE\n");
for(block = 0; block < inode->i_blocks; block++) {
- bh = bread(inode->i_dev, efs_bmap(inode, block), EFS_BLOCKSIZE);
+ bh = bread(inode->i_dev, efs_bmap(inode, block), EFS_DIRBSIZE);
if (!bh) {
printk("EFS: find_entry(): failed to read dir block %d\n", block);
return 0;