linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] debugfs: fix icheck finding blocks used for xattrs
@ 2011-06-10  6:02 Andreas Dilger
  2011-06-11 15:31 ` Ted Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Dilger @ 2011-06-10  6:02 UTC (permalink / raw)
  To: tytso, linux-ext4; +Cc: Andreas Dilger

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>
---
 debugfs/icheck.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debugfs/icheck.c b/debugfs/icheck.c
index 643bc5b..729ac93 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)
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] debugfs: fix icheck finding blocks used for xattrs
  2011-06-10  6:02 [PATCH] debugfs: fix icheck finding blocks used for xattrs Andreas Dilger
@ 2011-06-11 15:31 ` Ted Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Ted Ts'o @ 2011-06-11 15:31 UTC (permalink / raw)
  To: Andreas Dilger; +Cc: linux-ext4

On Fri, Jun 10, 2011 at 12:02:50AM -0600, Andreas Dilger wrote:
> 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>

Applied to the next branch, thanks.

						- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-11 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-10  6:02 [PATCH] debugfs: fix icheck finding blocks used for xattrs Andreas Dilger
2011-06-11 15:31 ` Ted Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).