bcachefs: Don't export __bch2_fs_read_write
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 26 Dec 2019 19:54:43 +0000 (14:54 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:33 +0000 (17:08 -0400)
BTREE_INSERT_LAZY_RW was added for this since this code was written; use
it instead.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/recovery.c
fs/bcachefs/super.c
fs/bcachefs/super.h

index c366050d572ce0185bde390027c8882f509cebc2..9c90d2bbb7cc4a42993e004e4561e61ef6fca5f7 100644 (file)
@@ -986,11 +986,6 @@ int bch2_fs_initialize(struct bch_fs *c)
        bch2_fs_journal_start(&c->journal, 1, &journal);
        bch2_journal_set_replay_done(&c->journal);
 
-       err = "error going read write";
-       ret = __bch2_fs_read_write(c, true);
-       if (ret)
-               goto err;
-
        bch2_inode_init(c, &root_inode, 0, 0,
                        S_IFDIR|S_IRWXU|S_IRUGO|S_IXUGO, 0, NULL);
        root_inode.bi_inum = BCACHEFS_ROOT_INO;
@@ -999,7 +994,7 @@ int bch2_fs_initialize(struct bch_fs *c)
        err = "error creating root directory";
        ret = bch2_btree_insert(c, BTREE_ID_INODES,
                                &packed_inode.inode.k_i,
-                               NULL, NULL, 0);
+                               NULL, NULL, BTREE_INSERT_LAZY_RW);
        if (ret)
                goto err;
 
index 2e23cc3dbf2f02e1730f7d801e9569da07f68e7e..cd02e5a5f3059bf83a0521c8656868ced5702bda 100644 (file)
@@ -372,7 +372,7 @@ static int bch2_fs_read_write_late(struct bch_fs *c)
        return 0;
 }
 
-int __bch2_fs_read_write(struct bch_fs *c, bool early)
+static int __bch2_fs_read_write(struct bch_fs *c, bool early)
 {
        struct bch_dev *ca;
        unsigned i;
index 1b97c6115535a6dd570e7114ca6b3a6905829b8f..b948cb0428c7ebc5a3e1e87dd2568af4febff2b8 100644 (file)
@@ -218,7 +218,6 @@ struct bch_dev *bch2_dev_lookup(struct bch_fs *, const char *);
 bool bch2_fs_emergency_read_only(struct bch_fs *);
 void bch2_fs_read_only(struct bch_fs *);
 
-int __bch2_fs_read_write(struct bch_fs *, bool);
 int bch2_fs_read_write(struct bch_fs *);
 int bch2_fs_read_write_early(struct bch_fs *);