]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/quota.c
Update bcachefs sources to b964c6cba8 bcachefs: Change lockrestart_do() to always...
[bcachefs-tools-debian] / libbcachefs / quota.c
index 3f78fe7d37f4b8c26a1d8dde39aacd2172478a43..7861781a4a7fea4de99f209070be22f61ec71b84 100644 (file)
@@ -742,7 +742,9 @@ static int bch2_set_quota_trans(struct btree_trans *trans,
        if (qdq->d_fieldmask & QC_INO_HARD)
                new_quota->v.c[Q_INO].hardlimit = cpu_to_le64(qdq->d_ino_hardlimit);
 
-       return bch2_trans_update(trans, iter, &new_quota->k_i, 0);
+       ret = bch2_trans_update(trans, iter, &new_quota->k_i, 0);
+       bch2_trans_iter_put(trans, iter);
+       return ret;
 }
 
 static int bch2_set_quota(struct super_block *sb, struct kqid qid,
@@ -758,7 +760,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));
 
-       ret = bch2_trans_do(c, NULL, NULL, BTREE_INSERT_NOUNLOCK,
+       ret = bch2_trans_do(c, NULL, NULL, 0,
                            bch2_set_quota_trans(&trans, &new_quota, qdq)) ?:
                __bch2_quota_set(c, bkey_i_to_s_c(&new_quota.k_i));