diff options
author | Goffredo Baroncelli <kreijack@inwind.it> | 2017-08-18 09:04:20 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-09-08 16:15:05 +0200 |
commit | 02d04d8b2393c1760a845699fae96c15589c7613 (patch) | |
tree | a6bc3e28717b5c5b19fe710d7fd8525bdd0e1a83 /cmds-fi-du.c | |
parent | a36d92cb8b52be7d9aa5c38cb42f7ebb56f289c2 (diff) |
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 <kreijack@inwind.it>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-fi-du.c')
-rw-r--r-- | cmds-fi-du.c | 1 |
1 files changed, 1 insertions, 0 deletions
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, |