bcachefs: Fix bch2_write_begin()

An error case was jumping to the wrong label, creating an infinite loop
- oops.

This fixes fstests generic/648.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2022-10-13 00:24:17 -04:00
parent 40405557b9
commit 3a4d3656e5

View File

@ -1517,7 +1517,7 @@ int bch2_write_begin(struct file *file, struct address_space *mapping,
if (!bch2_page_state_create(page, __GFP_NOFAIL)->uptodate) {
ret = bch2_page_state_set(c, inode_inum(inode), &page, 1);
if (ret)
goto out;
goto err;
}
ret = bch2_page_reservation_get(c, inode, page, res,