Skip to content

Commit

Permalink
jbd2: simplify error path on allocation failure in do_get_write_access()
Browse files Browse the repository at this point in the history
We were acquiring bh_state_lock when allocation of buffer failed in
do_get_write_access() only to be able to jump to a label that releases
the lock and does all other checks that don't make sense for this error
path. Just jump into the right label instead.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
Jan Kara authored and Theodore Ts'o committed Jun 8, 2015
1 parent ee57aba commit d012aa5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/jbd2/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -947,8 +947,7 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,
__func__);
JBUFFER_TRACE(jh, "oom!");
error = -ENOMEM;
jbd_lock_bh_state(bh);
goto done;
goto out;
}
goto repeat;
}
Expand Down

0 comments on commit d012aa5

Please sign in to comment.