From 02d04d8b2393c1760a845699fae96c15589c7613 Mon Sep 17 00:00:00 2001 From: Goffredo Baroncelli Date: Fri, 18 Aug 2017 09:04:20 +0200 Subject: btrfs-progs: reset the ret value when ignoring an error from du_add_file In du_walk_dir(), when du_add_file() returns an error it is usually ignored. However if the error is returned querying the last item, the error is returned to the caller. Signed-off-by: Goffredo Baroncelli Signed-off-by: David Sterba --- cmds-fi-du.c | 1 + 1 file changed, 1 insertion(+) (limited to 'cmds-fi-du.c') diff --git a/cmds-fi-du.c b/cmds-fi-du.c index f106f45b..4bf6af3e 100644 --- a/cmds-fi-du.c +++ b/cmds-fi-du.c @@ -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, -- cgit v1.2.3