]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/fs.c
Update bcachefs sources to bee7b5a4fa21 bcachefs: Pin btree cache in ram for random...
[bcachefs-tools-debian] / libbcachefs / fs.c
index 77ea61090e913555624c2a093b5d851475887797..4445fa2f53d02b341add2899e7df044150abcee8 100644 (file)
@@ -503,7 +503,7 @@ static int bch2_link(struct dentry *old_dentry, struct inode *vdir,
                bch2_subvol_is_ro(c, inode->ei_subvol) ?:
                __bch2_link(c, inode, dir, dentry);
        if (unlikely(ret))
-               return ret;
+               return bch2_err_class(ret);
 
        ihold(&inode->v);
        d_instantiate(dentry, &inode->v);
@@ -555,8 +555,9 @@ static int bch2_unlink(struct inode *vdir, struct dentry *dentry)
        struct bch_inode_info *dir= to_bch_ei(vdir);
        struct bch_fs *c = dir->v.i_sb->s_fs_info;
 
-       return bch2_subvol_is_ro(c, dir->ei_subvol) ?:
+       int ret = bch2_subvol_is_ro(c, dir->ei_subvol) ?:
                __bch2_unlink(vdir, dentry, false);
+       return bch2_err_class(ret);
 }
 
 static int bch2_symlink(struct mnt_idmap *idmap,
@@ -591,7 +592,7 @@ static int bch2_symlink(struct mnt_idmap *idmap,
        return 0;
 err:
        iput(&inode->v);
-       return ret;
+       return bch2_err_class(ret);
 }
 
 static int bch2_mkdir(struct mnt_idmap *idmap,