summaryrefslogtreecommitdiff
path: root/mkfs
diff options
context:
space:
mode:
authorMatthias Benkard <matthias.benkard@egym.de>2018-04-25 16:34:54 +0200
committerDavid Sterba <dsterba@suse.com>2018-06-07 16:37:40 +0200
commitdb84e5908dc4f2232700649992e834fd7630fa48 (patch)
tree3dd1a168b8f8f29da0436f22e54d485d9a3e571b /mkfs
parent09827a8a332fdb1b74f4e103b8b72b0b800b5d72 (diff)
btrfs-progs: mkfs: traverse_directory: Reset error code on continue
In case add_inode_items returned -EEXIST, traverse_directory would handle the condition and still continue under certain circumstances, but it would not reset the error code, leading to spurious failure later. This patch fixes that. Pull-request: #124 Author: Matthias Benkard <matthias.benkard@egym.de> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'mkfs')
-rw-r--r--mkfs/rootdir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mkfs/rootdir.c b/mkfs/rootdir.c
index ff00bb0f..834aacc0 100644
--- a/mkfs/rootdir.c
+++ b/mkfs/rootdir.c
@@ -553,6 +553,7 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
(unsigned long)st.st_nlink);
goto fail;
}
+ ret = 0;
continue;
}
if (ret) {