Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
2f91306a
cloud-kernel
项目概览
openanolis
/
cloud-kernel
接近 2 年 前同步成功
通知
169
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看板
提交
2f91306a
编写于
4月 11, 2016
作者:
D
David Sterba
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
btrfs: send: use vmalloc only as fallback for clone_sources_tmp
Signed-off-by:
N
David Sterba
<
dsterba@suse.com
>
上级
c03d01f3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
5 deletion
+8
-5
fs/btrfs/send.c
fs/btrfs/send.c
+8
-5
未找到文件。
fs/btrfs/send.c
浏览文件 @
2f91306a
...
...
@@ -6065,10 +6065,13 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
alloc_size
=
arg
->
clone_sources_count
*
sizeof
(
*
arg
->
clone_sources
);
if
(
arg
->
clone_sources_count
)
{
clone_sources_tmp
=
vmalloc
(
alloc_size
);
clone_sources_tmp
=
kmalloc
(
alloc_size
,
GFP_KERNEL
|
__GFP_NOWARN
);
if
(
!
clone_sources_tmp
)
{
ret
=
-
ENOMEM
;
goto
out
;
clone_sources_tmp
=
vmalloc
(
alloc_size
);
if
(
!
clone_sources_tmp
)
{
ret
=
-
ENOMEM
;
goto
out
;
}
}
ret
=
copy_from_user
(
clone_sources_tmp
,
arg
->
clone_sources
,
...
...
@@ -6106,7 +6109,7 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
sctx
->
clone_roots
[
i
].
root
=
clone_root
;
clone_sources_to_rollback
=
i
+
1
;
}
vfree
(
clone_sources_tmp
);
k
vfree
(
clone_sources_tmp
);
clone_sources_tmp
=
NULL
;
}
...
...
@@ -6224,7 +6227,7 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
btrfs_root_dec_send_in_progress
(
sctx
->
parent_root
);
kfree
(
arg
);
vfree
(
clone_sources_tmp
);
k
vfree
(
clone_sources_tmp
);
if
(
sctx
)
{
if
(
sctx
->
send_filp
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录