summaryrefslogtreecommitdiffstats
path: root/fs/efs/inode.c
diff options
context:
space:
mode:
authorAl Smith <Al.Smith@aeschi.ch.eu.org>1999-05-02 12:09:17 +0000
committerAl Smith <Al.Smith@aeschi.ch.eu.org>1999-05-02 12:09:17 +0000
commit4a7fdfbd17814fc999257f81256fe34e4bd20bdd (patch)
treee5a8076422239ad80bdbd5213cf151e38bfb12c0 /fs/efs/inode.c
parent9f99c1f15350847e106bbe6bebc99d1d8f24901b (diff)
Final changes for release 1.0 of efs.
Diffstat (limited to 'fs/efs/inode.c')
-rw-r--r--fs/efs/inode.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/fs/efs/inode.c b/fs/efs/inode.c
index 9f53f2a7d..b6a2ad3fa 100644
--- a/fs/efs/inode.c
+++ b/fs/efs/inode.c
@@ -62,7 +62,7 @@ void efs_read_inode(struct inode *inode) {
bh = bread(inode->i_dev, block, EFS_BLOCKSIZE);
if (!bh) {
- printk("EFS: bread() failed at block %d\n", block);
+ printk(KERN_WARNING "EFS: bread() failed at block %d\n", block);
goto read_inode_error;
}
@@ -107,7 +107,7 @@ void efs_read_inode(struct inode *inode) {
for(i = 0; i < EFS_DIRECTEXTENTS; i++) {
extent_copy(&(efs_inode->di_u.di_extents[i]), &(in->extents[i]));
if (i < in->numextents && in->extents[i].cooked.ex_magic != 0) {
- printk("EFS: extent %d has bad magic number in inode %lu\n", i, inode->i_ino);
+ printk(KERN_WARNING "EFS: extent %d has bad magic number in inode %lu\n", i, inode->i_ino);
brelse(bh);
goto read_inode_error;
}
@@ -116,7 +116,7 @@ void efs_read_inode(struct inode *inode) {
brelse(bh);
#ifdef DEBUG
- printk("EFS: read_inode(): inode %lu, extents %d, mode %o\n",
+ printk(KERN_DEBUG "EFS: read_inode(): inode %lu, extents %d, mode %o\n",
inode->i_ino, in->numextents, inode->i_mode);
#endif
@@ -142,7 +142,7 @@ void efs_read_inode(struct inode *inode) {
init_fifo(inode);
break;
default:
- printk("EFS: unsupported inode mode %o\n", inode->i_mode);
+ printk(KERN_WARNING "EFS: unsupported inode mode %o\n", inode->i_mode);
goto read_inode_error;
break;
}
@@ -150,7 +150,7 @@ void efs_read_inode(struct inode *inode) {
return;
read_inode_error:
- printk("EFS: failed to read inode %lu\n", inode->i_ino);
+ printk(KERN_WARNING "EFS: failed to read inode %lu\n", inode->i_ino);
inode->i_mode = S_IFREG;
inode->i_atime = 0;
inode->i_ctime = 0;
@@ -205,7 +205,7 @@ efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
/* if we only have one extent then nothing can be found */
if (in->numextents == 1) {
- printk("EFS: map_block() failed to map (1 extent)\n");
+ printk(KERN_ERR "EFS: map_block() failed to map (1 extent)\n");
return 0;
}
@@ -223,12 +223,12 @@ efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
}
}
- printk("EFS: map_block() failed to map block %u (dir)\n", block);
+ printk(KERN_ERR "EFS: map_block() failed to map block %u (dir)\n", block);
return 0;
}
#ifdef DEBUG
- printk("EFS: map_block(): indirect search for logical block %u\n", block);
+ printk(KERN_DEBUG "EFS: map_block(): indirect search for logical block %u\n", block);
#endif
direxts = in->extents[0].cooked.ex_offset;
indexts = in->numextents;
@@ -251,7 +251,8 @@ efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
if (dirext == direxts) {
/* should never happen */
- printk("EFS: couldn't find direct extent for indirect extent %d (block %u)\n", cur, block);
+ printk(KERN_ERR "EFS: couldn't find direct extent for indirect extent %d (block %u)\n", cur, block);
+ if (bh) brelse(bh);
return 0;
}
@@ -267,11 +268,11 @@ efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
bh = bread(inode->i_dev, iblock, EFS_BLOCKSIZE);
if (!bh) {
- printk("EFS: bread() failed at block %d\n", iblock);
+ printk(KERN_ERR "EFS: bread() failed at block %d\n", iblock);
return 0;
}
#ifdef DEBUG
- printk("EFS: map_block(): read indirect extent block %d\n", iblock);
+ printk(KERN_DEBUG "EFS: map_block(): read indirect extent block %d\n", iblock);
#endif
first = 0;
lastblock = iblock;
@@ -282,19 +283,19 @@ efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
extent_copy(&(exts[ioffset]), &ext);
if (ext.cooked.ex_magic != 0) {
- printk("EFS: extent %d has bad magic number in block %d\n", cur, iblock);
- brelse(bh);
+ printk(KERN_ERR "EFS: extent %d has bad magic number in block %d\n", cur, iblock);
+ if (bh) brelse(bh);
return 0;
}
if ((result = efs_extent_check(&ext, block, sb))) {
- brelse(bh);
+ if (bh) brelse(bh);
in->lastextent = cur;
return result;
}
}
if (bh) brelse(bh);
- printk("EFS: map_block() failed to map block %u (indir)\n", block);
+ printk(KERN_ERR "EFS: map_block() failed to map block %u (indir)\n", block);
return 0;
}