btrfs-progs: reset the ret value when ignoring an error from du_add_file
[platform/upstream/btrfs-progs.git] / cmds-fi-du.c
index f106f45..4bf6af3 100644 (file)
@@ -403,6 +403,7 @@ static int du_walk_dir(struct du_dir_ctxt *ctxt, struct rb_root *shared_extents)
                                                  shared_extents, &tot, &shr,
                                                  0);
                                if (ret == -ENOTTY) {
+                                       ret = 0;
                                        continue;
                                } else if (ret) {
                                        fprintf(stderr,