OSDN Git Service

filefrag: fix infinite loop in filefrag
authorTheodore Ts'o <tytso@mit.edu>
Sun, 9 Oct 2011 22:18:01 +0000 (18:18 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 9 Oct 2011 22:18:01 +0000 (18:18 -0400)
Commit a00be17e4768 was missing a patch hunk needed to prevent
filefrag from looping forever when it is run without the -v option.

Addresses-Debian-Bug: #644792

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/filefrag.c

index 324506a..0583e91 100644 (file)
@@ -181,13 +181,6 @@ static int filefrag_fiemap(int fd, int blk_shift, int *num_extents)
 
        memset(fiemap, 0, sizeof(struct fiemap));
 
-       /*
-        * If count (and therefore fm_extent_count) == 0, FIEMAP
-        * returns count of extents found without filling in details.
-        */
-       if (!verbose)
-               count = 0;
-
        if (sync_file)
                flags |= FIEMAP_FLAG_SYNC;