mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 03:01:41 +02:00
bcachefs: minor journal errcode cleanup
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
1ccbcd3205
commit
cb87f623c1
|
|
@ -981,7 +981,7 @@ int bch2_journal_meta(struct journal *j)
|
|||
struct bch_fs *c = container_of(j, struct bch_fs, journal);
|
||||
|
||||
if (!bch2_write_ref_tryget(c, BCH_WRITE_REF_journal))
|
||||
return -EROFS;
|
||||
return -BCH_ERR_erofs_no_writes;
|
||||
|
||||
int ret = __bch2_journal_meta(j);
|
||||
bch2_write_ref_put(c, BCH_WRITE_REF_journal);
|
||||
|
|
|
|||
|
|
@ -1515,7 +1515,7 @@ static void __journal_write_alloc(struct journal *j,
|
|||
* @j: journal object
|
||||
* @w: journal buf (entry to be written)
|
||||
*
|
||||
* Returns: 0 on success, or -EROFS on failure
|
||||
* Returns: 0 on success, or -BCH_ERR_insufficient_devices on failure
|
||||
*/
|
||||
static int journal_write_alloc(struct journal *j, struct journal_buf *w)
|
||||
{
|
||||
|
|
@ -1624,8 +1624,7 @@ static CLOSURE_CALLBACK(journal_write_done)
|
|||
} else {
|
||||
bch2_devlist_to_replicas(&replicas.e, BCH_DATA_journal,
|
||||
w->devs_written);
|
||||
if (bch2_mark_replicas(c, &replicas.e))
|
||||
err = -EIO;
|
||||
err = bch2_mark_replicas(c, &replicas.e);
|
||||
}
|
||||
|
||||
if (err)
|
||||
|
|
@ -1988,7 +1987,7 @@ static int bch2_journal_write_pick_flush(struct journal *j, struct journal_buf *
|
|||
* write anything at all.
|
||||
*/
|
||||
if (error && test_bit(JOURNAL_need_flush_write, &j->flags))
|
||||
return -EIO;
|
||||
return error;
|
||||
|
||||
if (error ||
|
||||
w->noflush ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user