Hi,

On 08/30/2016 12:22 AM, David Sterba wrote:
On Thu, Aug 25, 2016 at 01:20:59PM +0800, Wang Xiaoguang wrote:
Signed-off-by: Wang Xiaoguang <[email protected]>
---
  cmds-check.c | 5 -----
  1 file changed, 5 deletions(-)

diff --git a/cmds-check.c b/cmds-check.c
index 0ddfd24..1cd0421 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -3737,7 +3737,6 @@ static int check_fs_root(struct btrfs_root *root,
                path.slots[level] = 0;
        } else {
                struct btrfs_key key;
-               struct btrfs_disk_key found_key;
btrfs_disk_key_to_cpu(&key, &root_item->drop_progress);
                level = root_item->drop_level;
@@ -3745,10 +3744,6 @@ static int check_fs_root(struct btrfs_root *root,
                wret = btrfs_search_slot(NULL, root, &key, &path, 0, 0);
                if (wret < 0)
                        goto skip_walking;
-               btrfs_node_key(path.nodes[level], &found_key,
-                               path.slots[level]);
-               WARN_ON(memcmp(&found_key, &root_item->drop_progress,
-                                       sizeof(found_key)));
It's not unused, the WARN_ON is an if in disguise, ane memcmp does the
check, am I missing something here?
No, you're right.
I mistakenly took the memcmp() as memcpy(), sorry.

Regards,
Xiaoguang Wang




--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to