@@ -435,7 +435,7 @@ static int bch2_link(struct dentry *old_dentry, struct inode *vdir,
435435 bch2_subvol_is_ro (c , inode -> ei_subvol ) ?:
436436 __bch2_link (c , inode , dir , dentry );
437437 if (unlikely (ret ))
438- return ret ;
438+ return bch2_err_class ( ret ) ;
439439
440440 ihold (& inode -> v );
441441 d_instantiate (dentry , & inode -> v );
@@ -487,8 +487,9 @@ static int bch2_unlink(struct inode *vdir, struct dentry *dentry)
487487 struct bch_inode_info * dir = to_bch_ei (vdir );
488488 struct bch_fs * c = dir -> v .i_sb -> s_fs_info ;
489489
490- return bch2_subvol_is_ro (c , dir -> ei_subvol ) ?:
490+ int ret = bch2_subvol_is_ro (c , dir -> ei_subvol ) ?:
491491 __bch2_unlink (vdir , dentry , false);
492+ return bch2_err_class (ret );
492493}
493494
494495static int bch2_symlink (struct mnt_idmap * idmap ,
@@ -523,7 +524,7 @@ static int bch2_symlink(struct mnt_idmap *idmap,
523524 return 0 ;
524525err :
525526 iput (& inode -> v );
526- return ret ;
527+ return bch2_err_class ( ret ) ;
527528}
528529
529530static int bch2_mkdir (struct mnt_idmap * idmap ,
@@ -641,7 +642,7 @@ static int bch2_rename2(struct mnt_idmap *idmap,
641642 src_inode ,
642643 dst_inode );
643644
644- return ret ;
645+ return bch2_err_class ( ret ) ;
645646}
646647
647648static void bch2_setattr_copy (struct mnt_idmap * idmap ,
0 commit comments