提交 22581f58 编写于 作者: C Christoph Hellwig 提交者: NeilBrown

raid5-cache: clean up r5l_get_meta

Remove the only partially used local 'io' variable to simplify the code
flow.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NShaohua Li <shli@fb.com>
Signed-off-by: NNeilBrown <neilb@suse.com>
上级 56fef7c6
......@@ -322,16 +322,12 @@ static struct r5l_io_unit *r5l_new_meta(struct r5l_log *log)
static int r5l_get_meta(struct r5l_log *log, unsigned int payload_size)
{
struct r5l_io_unit *io;
io = log->current_io;
if (io && io->meta_offset + payload_size > PAGE_SIZE)
if (log->current_io &&
log->current_io->meta_offset + payload_size > PAGE_SIZE)
r5l_submit_current_io(log);
io = log->current_io;
if (io)
return 0;
log->current_io = r5l_new_meta(log);
if (!log->current_io)
log->current_io = r5l_new_meta(log);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册