Skip to content

Commit

Permalink
posix_to_bcachefs: fix missing copy_xattrs() error checking
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Overstreet <[email protected]>
  • Loading branch information
Kent Overstreet committed Aug 20, 2024
1 parent 8e0023e commit 3103981
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions c_src/posix_to_bcachefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 3103981

Please sign in to comment.