]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/quota.c
Update bcachefs sources to 96b991466a bcachefs: Improve error message in fsck
[bcachefs-tools-debian] / libbcachefs / quota.c
index 2b0edb6826d1be58457ca3e437e653625ae0e8df..e7787c5063ce3d7932fe5295702cae12b52ded9f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "bcachefs.h"
 #include "btree_update.h"
 #include "inode.h"
@@ -360,7 +361,7 @@ static int bch2_quota_init_type(struct bch_fs *c, enum quota_types type)
        struct bkey_s_c k;
        int ret = 0;
 
-       bch2_trans_init(&trans, c);
+       bch2_trans_init(&trans, c, 0, 0);
 
        for_each_btree_key(&trans, iter, BTREE_ID_QUOTAS, POS(type, 0),
                           BTREE_ITER_PREFETCH, k, ret) {
@@ -432,7 +433,7 @@ int bch2_fs_quota_read(struct bch_fs *c)
                        return ret;
        }
 
-       bch2_trans_init(&trans, c);
+       bch2_trans_init(&trans, c, 0, 0);
 
        for_each_btree_key(&trans, iter, BTREE_ID_INODES, POS_MIN,
                           BTREE_ITER_PREFETCH, k, ret) {
@@ -725,7 +726,7 @@ static int bch2_set_quota(struct super_block *sb, struct kqid qid,
        bkey_quota_init(&new_quota.k_i);
        new_quota.k.p = POS(qid.type, from_kqid(&init_user_ns, qid));
 
-       bch2_trans_init(&trans, c);
+       bch2_trans_init(&trans, c, 0, 0);
 
        iter = bch2_trans_get_iter(&trans, BTREE_ID_QUOTAS, new_quota.k.p,
                                   BTREE_ITER_SLOTS|BTREE_ITER_INTENT);
@@ -751,7 +752,7 @@ static int bch2_set_quota(struct super_block *sb, struct kqid qid,
        if (qdq->d_fieldmask & QC_INO_HARD)
                new_quota.v.c[Q_INO].hardlimit = cpu_to_le64(qdq->d_ino_hardlimit);
 
-       bch2_trans_update(&trans, BTREE_INSERT_ENTRY(iter, &new_quota.k_i));
+       bch2_trans_update(&trans, iter, &new_quota.k_i, 0);
 
        ret = bch2_trans_commit(&trans, NULL, NULL, 0);