aboutsummaryrefslogtreecommitdiffstats
path: root/debugfs/icheck.c
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@whamcloud.com>2011-06-11 11:29:54 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-06-11 11:29:54 -0400
commit1d8f5ae36e95f18bfb74a0851ed42cb45fd0445a (patch)
treed8d1a0e28f456d0658cedc4a320c89e0252a3a8a /debugfs/icheck.c
parent25bc8c756f0f8c5e703f86c8d6da882dc77bfa84 (diff)
downloadandroid_external_e2fsprogs-1d8f5ae36e95f18bfb74a0851ed42cb45fd0445a.tar.gz
android_external_e2fsprogs-1d8f5ae36e95f18bfb74a0851ed42cb45fd0445a.tar.bz2
android_external_e2fsprogs-1d8f5ae36e95f18bfb74a0851ed42cb45fd0445a.zip
debugfs: fix icheck finding blocks used for xattrs
This was an "uninitialized variable" warning, but it turns out to be a real bug. Without this change, it is not possible to use "icheck" to find blocks that are used for the i_file_acl (xattr) block. Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'debugfs/icheck.c')
-rw-r--r--debugfs/icheck.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/debugfs/icheck.c b/debugfs/icheck.c
index 643bc5bc..729ac930 100644
--- a/debugfs/icheck.c
+++ b/debugfs/icheck.c
@@ -106,13 +106,15 @@ void do_icheck(int argc, char **argv)
}
while (ino) {
+ blk64_t blk;
+
if (!inode.i_links_count)
goto next;
bw.inode = ino;
- if (ext2fs_file_acl_block(&inode)) {
- blk64_t blk;
+ blk = ext2fs_file_acl_block(&inode);
+ if (blk) {
icheck_proc(current_fs, &blk, 0,
0, 0, &bw);
if (bw.blocks_left == 0)