mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-29 01:22:13 +00:00
btrfs-progs: mkfs: switch BUG_ON to error handling in traverse_directory
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
4fd93da3cf
commit
33a9723066
7
mkfs.c
7
mkfs.c
@ -910,7 +910,12 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
|
||||
parent_inum, dir_index_cnt,
|
||||
&cur_inode);
|
||||
if (ret == -EEXIST) {
|
||||
BUG_ON(st.st_nlink <= 1);
|
||||
if (st.st_nlink <= 1) {
|
||||
error(
|
||||
"item %s already exists but has wrong st_nlink %ld <= 1",
|
||||
cur_file->d_name, st.st_nlink);
|
||||
goto fail;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (ret) {
|
||||
|
Loading…
Reference in New Issue
Block a user