diff options
-rw-r--r-- | c_src/posix_to_bcachefs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/c_src/posix_to_bcachefs.c b/c_src/posix_to_bcachefs.c index 81750751..19c53cc3 100644 --- a/c_src/posix_to_bcachefs.c +++ b/c_src/posix_to_bcachefs.c @@ -122,12 +122,13 @@ void copy_xattrs(struct bch_fs *c, struct bch_inode_unpacked *dst, die("error getting xattr val: %m"); const struct xattr_handler *h = xattr_resolve_name(&attr); - struct bch_inode_unpacked inode_u; + if (IS_ERR(h)) + continue; int ret = bch2_trans_do(c, NULL, NULL, 0, bch2_xattr_set(trans, (subvol_inum) { 1, dst->bi_inum }, - &inode_u, &hash_info, attr, + dst, &hash_info, attr, val, val_size, h->flags, 0)); if (ret < 0) die("error creating xattr: %s", bch2_err_str(ret)); |