Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
a0c5895b
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a0c5895b
编写于
1月 22, 2018
作者:
I
Ilya Dryomov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rbd: use kmem_cache_zalloc() in rbd_img_request_create()
Signed-off-by:
N
Ilya Dryomov
<
idryomov@gmail.com
>
上级
2e584bce
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
2 addition
and
7 deletion
+2
-7
drivers/block/rbd.c
drivers/block/rbd.c
+2
-7
未找到文件。
drivers/block/rbd.c
浏览文件 @
a0c5895b
...
@@ -2124,15 +2124,13 @@ static struct rbd_img_request *rbd_img_request_create(
...
@@ -2124,15 +2124,13 @@ static struct rbd_img_request *rbd_img_request_create(
{
{
struct
rbd_img_request
*
img_request
;
struct
rbd_img_request
*
img_request
;
img_request
=
kmem_cache_alloc
(
rbd_img_request_cache
,
GFP_NOIO
);
img_request
=
kmem_cache_
z
alloc
(
rbd_img_request_cache
,
GFP_NOIO
);
if
(
!
img_request
)
if
(
!
img_request
)
return
NULL
;
return
NULL
;
img_request
->
rq
=
NULL
;
img_request
->
rbd_dev
=
rbd_dev
;
img_request
->
rbd_dev
=
rbd_dev
;
img_request
->
offset
=
offset
;
img_request
->
offset
=
offset
;
img_request
->
length
=
length
;
img_request
->
length
=
length
;
img_request
->
flags
=
0
;
if
(
op_type
==
OBJ_OP_DISCARD
)
{
if
(
op_type
==
OBJ_OP_DISCARD
)
{
img_request_discard_set
(
img_request
);
img_request_discard_set
(
img_request
);
img_request
->
snapc
=
snapc
;
img_request
->
snapc
=
snapc
;
...
@@ -2144,11 +2142,8 @@ static struct rbd_img_request *rbd_img_request_create(
...
@@ -2144,11 +2142,8 @@ static struct rbd_img_request *rbd_img_request_create(
}
}
if
(
rbd_dev_parent_get
(
rbd_dev
))
if
(
rbd_dev_parent_get
(
rbd_dev
))
img_request_layered_set
(
img_request
);
img_request_layered_set
(
img_request
);
spin_lock_init
(
&
img_request
->
completion_lock
);
spin_lock_init
(
&
img_request
->
completion_lock
);
img_request
->
next_completion
=
0
;
img_request
->
callback
=
NULL
;
img_request
->
result
=
0
;
img_request
->
obj_request_count
=
0
;
INIT_LIST_HEAD
(
&
img_request
->
obj_requests
);
INIT_LIST_HEAD
(
&
img_request
->
obj_requests
);
kref_init
(
&
img_request
->
kref
);
kref_init
(
&
img_request
->
kref
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录