提交 d012aa59 编写于 作者: J Jan Kara 提交者: Theodore Ts'o

jbd2: simplify error path on allocation failure in do_get_write_access()

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: NJan Kara <jack@suse.cz>
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 ee57aba1
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册