提交 da4ad3a2 编写于 作者: M Mike Snitzer

dm writecache: remove disabled code in memory_entry()

This dead branch was missed during review.  It only makes memory_entry()
more inefficient due to needless call to is_power_of_2(), etc.
Reported-by: Nshenghui <shhuiw@foxmail.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 3d4e7383
......@@ -350,10 +350,7 @@ static struct wc_memory_superblock *sb(struct dm_writecache *wc)
static struct wc_memory_entry *memory_entry(struct dm_writecache *wc, struct wc_entry *e)
{
if (is_power_of_2(sizeof(struct wc_entry)) && 0)
return &sb(wc)->entries[e - wc->entries];
else
return &sb(wc)->entries[e->index];
return &sb(wc)->entries[e->index];
}
static void *memory_data(struct dm_writecache *wc, struct wc_entry *e)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册