Whamcloud - gitweb
super.c (release_inode_blocks): Don't try to release the blocks if the
authorTheodore Ts'o <tytso@mit.edu>
Sat, 23 Jun 2001 00:35:38 +0000 (20:35 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 23 Jun 2001 00:35:38 +0000 (20:35 -0400)
orphaned inode is a device file, symlink, or some other kind of
special file that doesn't have a block list.

e2fsck/ChangeLog
e2fsck/super.c

index e2cb66c..782aec7 100644 (file)
@@ -1,3 +1,9 @@
+2001-06-19  Theodore Tso  <tytso@valinux.com>
+
+       * super.c (release_inode_blocks): Don't try to release the blocks
+               if the orphaned inode is a device file, symlink, or some
+               other kind of special file that doesn't have a block list.
+
 2001-06-15  Theodore Tso  <tytso@valinux.com>
 
        * Release of E2fsprogs 1.21
index 7a4a64a..1e67d1c 100644 (file)
@@ -172,6 +172,9 @@ static int release_inode_blocks(e2fsck_t ctx, ext2_ino_t ino,
        errcode_t                       retval;
        struct process_block_struct     pb;
 
+       if (!ext2fs_inode_has_valid_blocks(inode))
+               return 0;
+
        pb.buf = block_buf + 3 * ctx->fs->blocksize;
        pb.ctx = ctx;
        pb.abort = 0;