Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
e22b3d1f
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e22b3d1f
编写于
2月 26, 2016
作者:
D
David Sterba
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev/gfp-flags' into for-chris-4.6
上级
5f1b5664
66722f7c
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
60 addition
and
56 deletion
+60
-56
fs/btrfs/ctree.c
fs/btrfs/ctree.c
+1
-1
fs/btrfs/dev-replace.c
fs/btrfs/dev-replace.c
+1
-1
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+11
-10
fs/btrfs/file.c
fs/btrfs/file.c
+3
-3
fs/btrfs/inode.c
fs/btrfs/inode.c
+1
-1
fs/btrfs/ioctl.c
fs/btrfs/ioctl.c
+2
-2
fs/btrfs/reada.c
fs/btrfs/reada.c
+5
-5
fs/btrfs/scrub.c
fs/btrfs/scrub.c
+13
-11
fs/btrfs/send.c
fs/btrfs/send.c
+18
-18
fs/btrfs/volumes.c
fs/btrfs/volumes.c
+5
-4
未找到文件。
fs/btrfs/ctree.c
浏览文件 @
e22b3d1f
...
...
@@ -5361,7 +5361,7 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
goto
out
;
}
tmp_buf
=
kmalloc
(
left_root
->
nodesize
,
GFP_
NOFS
);
tmp_buf
=
kmalloc
(
left_root
->
nodesize
,
GFP_
KERNEL
);
if
(
!
tmp_buf
)
{
ret
=
-
ENOMEM
;
goto
out
;
...
...
fs/btrfs/dev-replace.c
浏览文件 @
e22b3d1f
...
...
@@ -802,7 +802,7 @@ static int btrfs_dev_replace_kthread(void *data)
struct
btrfs_ioctl_dev_replace_args
*
status_args
;
u64
progress
;
status_args
=
kzalloc
(
sizeof
(
*
status_args
),
GFP_
NOFS
);
status_args
=
kzalloc
(
sizeof
(
*
status_args
),
GFP_
KERNEL
);
if
(
status_args
)
{
btrfs_dev_replace_status
(
fs_info
,
status_args
);
progress
=
status_args
->
status
.
progress_1000
;
...
...
fs/btrfs/disk-io.c
浏览文件 @
e22b3d1f
...
...
@@ -1296,9 +1296,10 @@ static void __setup_root(u32 nodesize, u32 sectorsize, u32 stripesize,
spin_lock_init
(
&
root
->
root_item_lock
);
}
static
struct
btrfs_root
*
btrfs_alloc_root
(
struct
btrfs_fs_info
*
fs_info
)
static
struct
btrfs_root
*
btrfs_alloc_root
(
struct
btrfs_fs_info
*
fs_info
,
gfp_t
flags
)
{
struct
btrfs_root
*
root
=
kzalloc
(
sizeof
(
*
root
),
GFP_NOFS
);
struct
btrfs_root
*
root
=
kzalloc
(
sizeof
(
*
root
),
flags
);
if
(
root
)
root
->
fs_info
=
fs_info
;
return
root
;
...
...
@@ -1310,7 +1311,7 @@ struct btrfs_root *btrfs_alloc_dummy_root(void)
{
struct
btrfs_root
*
root
;
root
=
btrfs_alloc_root
(
NULL
);
root
=
btrfs_alloc_root
(
NULL
,
GFP_KERNEL
);
if
(
!
root
)
return
ERR_PTR
(
-
ENOMEM
);
__setup_root
(
4096
,
4096
,
4096
,
root
,
NULL
,
1
);
...
...
@@ -1332,7 +1333,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
int
ret
=
0
;
uuid_le
uuid
;
root
=
btrfs_alloc_root
(
fs_info
);
root
=
btrfs_alloc_root
(
fs_info
,
GFP_KERNEL
);
if
(
!
root
)
return
ERR_PTR
(
-
ENOMEM
);
...
...
@@ -1408,7 +1409,7 @@ static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans,
struct
btrfs_root
*
tree_root
=
fs_info
->
tree_root
;
struct
extent_buffer
*
leaf
;
root
=
btrfs_alloc_root
(
fs_info
);
root
=
btrfs_alloc_root
(
fs_info
,
GFP_NOFS
);
if
(
!
root
)
return
ERR_PTR
(
-
ENOMEM
);
...
...
@@ -1506,7 +1507,7 @@ static struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root,
if
(
!
path
)
return
ERR_PTR
(
-
ENOMEM
);
root
=
btrfs_alloc_root
(
fs_info
);
root
=
btrfs_alloc_root
(
fs_info
,
GFP_NOFS
);
if
(
!
root
)
{
ret
=
-
ENOMEM
;
goto
alloc_fail
;
...
...
@@ -2385,7 +2386,7 @@ static int btrfs_replay_log(struct btrfs_fs_info *fs_info,
return
-
EIO
;
}
log_tree_root
=
btrfs_alloc_root
(
fs_info
);
log_tree_root
=
btrfs_alloc_root
(
fs_info
,
GFP_KERNEL
);
if
(
!
log_tree_root
)
return
-
ENOMEM
;
...
...
@@ -2510,8 +2511,8 @@ int open_ctree(struct super_block *sb,
int
backup_index
=
0
;
int
max_active
;
tree_root
=
fs_info
->
tree_root
=
btrfs_alloc_root
(
fs_info
);
chunk_root
=
fs_info
->
chunk_root
=
btrfs_alloc_root
(
fs_info
);
tree_root
=
fs_info
->
tree_root
=
btrfs_alloc_root
(
fs_info
,
GFP_KERNEL
);
chunk_root
=
fs_info
->
chunk_root
=
btrfs_alloc_root
(
fs_info
,
GFP_KERNEL
);
if
(
!
tree_root
||
!
chunk_root
)
{
err
=
-
ENOMEM
;
goto
fail
;
...
...
@@ -2622,7 +2623,7 @@ int open_ctree(struct super_block *sb,
INIT_LIST_HEAD
(
&
fs_info
->
ordered_roots
);
spin_lock_init
(
&
fs_info
->
ordered_root_lock
);
fs_info
->
delayed_root
=
kmalloc
(
sizeof
(
struct
btrfs_delayed_root
),
GFP_
NOFS
);
GFP_
KERNEL
);
if
(
!
fs_info
->
delayed_root
)
{
err
=
-
ENOMEM
;
goto
fail_iput
;
...
...
fs/btrfs/file.c
浏览文件 @
e22b3d1f
...
...
@@ -2636,7 +2636,7 @@ static int add_falloc_range(struct list_head *head, u64 start, u64 len)
return
0
;
}
insert:
range
=
kmalloc
(
sizeof
(
*
range
),
GFP_
NOFS
);
range
=
kmalloc
(
sizeof
(
*
range
),
GFP_
KERNEL
);
if
(
!
range
)
return
-
ENOMEM
;
range
->
start
=
start
;
...
...
@@ -2737,7 +2737,7 @@ static long btrfs_fallocate(struct file *file, int mode,
btrfs_put_ordered_extent
(
ordered
);
unlock_extent_cached
(
&
BTRFS_I
(
inode
)
->
io_tree
,
alloc_start
,
locked_end
,
&
cached_state
,
GFP_
NOFS
);
&
cached_state
,
GFP_
KERNEL
);
/*
* we can't wait on the range with the transaction
* running or with the extent lock held
...
...
@@ -2831,7 +2831,7 @@ static long btrfs_fallocate(struct file *file, int mode,
}
out_unlock:
unlock_extent_cached
(
&
BTRFS_I
(
inode
)
->
io_tree
,
alloc_start
,
locked_end
,
&
cached_state
,
GFP_
NOFS
);
&
cached_state
,
GFP_
KERNEL
);
out:
/*
* As we waited the extent range, the data_rsv_map must be empty
...
...
fs/btrfs/inode.c
浏览文件 @
e22b3d1f
...
...
@@ -5793,7 +5793,7 @@ static int btrfs_real_readdir(struct file *file, struct dir_context *ctx)
if
(
name_len
<=
sizeof
(
tmp_name
))
{
name_ptr
=
tmp_name
;
}
else
{
name_ptr
=
kmalloc
(
name_len
,
GFP_
NOFS
);
name_ptr
=
kmalloc
(
name_len
,
GFP_
KERNEL
);
if
(
!
name_ptr
)
{
ret
=
-
ENOMEM
;
goto
err
;
...
...
fs/btrfs/ioctl.c
浏览文件 @
e22b3d1f
...
...
@@ -2925,8 +2925,8 @@ static int btrfs_cmp_data_prepare(struct inode *src, u64 loff,
* of the array is bounded by len, which is in turn bounded by
* BTRFS_MAX_DEDUPE_LEN.
*/
src_pgarr
=
k
zalloc
(
num_pages
*
sizeof
(
struct
page
*
),
GFP_NOFS
);
dst_pgarr
=
k
zalloc
(
num_pages
*
sizeof
(
struct
page
*
),
GFP_NOFS
);
src_pgarr
=
k
calloc
(
num_pages
,
sizeof
(
struct
page
*
),
GFP_KERNEL
);
dst_pgarr
=
k
calloc
(
num_pages
,
sizeof
(
struct
page
*
),
GFP_KERNEL
);
if
(
!
src_pgarr
||
!
dst_pgarr
)
{
kfree
(
src_pgarr
);
kfree
(
dst_pgarr
);
...
...
fs/btrfs/reada.c
浏览文件 @
e22b3d1f
...
...
@@ -280,7 +280,7 @@ static struct reada_zone *reada_find_zone(struct btrfs_fs_info *fs_info,
end
=
start
+
cache
->
key
.
offset
-
1
;
btrfs_put_block_group
(
cache
);
zone
=
kzalloc
(
sizeof
(
*
zone
),
GFP_
NOFS
);
zone
=
kzalloc
(
sizeof
(
*
zone
),
GFP_
KERNEL
);
if
(
!
zone
)
return
NULL
;
...
...
@@ -343,7 +343,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
if
(
re
)
return
re
;
re
=
kzalloc
(
sizeof
(
*
re
),
GFP_
NOFS
);
re
=
kzalloc
(
sizeof
(
*
re
),
GFP_
KERNEL
);
if
(
!
re
)
return
NULL
;
...
...
@@ -566,7 +566,7 @@ static int reada_add_block(struct reada_control *rc, u64 logical,
if
(
!
re
)
return
-
1
;
rec
=
kzalloc
(
sizeof
(
*
rec
),
GFP_
NOFS
);
rec
=
kzalloc
(
sizeof
(
*
rec
),
GFP_
KERNEL
);
if
(
!
rec
)
{
reada_extent_put
(
root
->
fs_info
,
re
);
return
-
ENOMEM
;
...
...
@@ -791,7 +791,7 @@ static void reada_start_machine(struct btrfs_fs_info *fs_info)
{
struct
reada_machine_work
*
rmw
;
rmw
=
kzalloc
(
sizeof
(
*
rmw
),
GFP_
NOFS
);
rmw
=
kzalloc
(
sizeof
(
*
rmw
),
GFP_
KERNEL
);
if
(
!
rmw
)
{
/* FIXME we cannot handle this properly right now */
BUG
();
...
...
@@ -926,7 +926,7 @@ struct reada_control *btrfs_reada_add(struct btrfs_root *root,
.
offset
=
(
u64
)
-
1
};
rc
=
kzalloc
(
sizeof
(
*
rc
),
GFP_
NOFS
);
rc
=
kzalloc
(
sizeof
(
*
rc
),
GFP_
KERNEL
);
if
(
!
rc
)
return
ERR_PTR
(
-
ENOMEM
);
...
...
fs/btrfs/scrub.c
浏览文件 @
e22b3d1f
...
...
@@ -461,7 +461,7 @@ struct scrub_ctx *scrub_setup_ctx(struct btrfs_device *dev, int is_dev_replace)
struct
btrfs_fs_info
*
fs_info
=
dev
->
dev_root
->
fs_info
;
int
ret
;
sctx
=
kzalloc
(
sizeof
(
*
sctx
),
GFP_
NOFS
);
sctx
=
kzalloc
(
sizeof
(
*
sctx
),
GFP_
KERNEL
);
if
(
!
sctx
)
goto
nomem
;
atomic_set
(
&
sctx
->
refs
,
1
);
...
...
@@ -472,7 +472,7 @@ struct scrub_ctx *scrub_setup_ctx(struct btrfs_device *dev, int is_dev_replace)
for
(
i
=
0
;
i
<
SCRUB_BIOS_PER_SCTX
;
++
i
)
{
struct
scrub_bio
*
sbio
;
sbio
=
kzalloc
(
sizeof
(
*
sbio
),
GFP_
NOFS
);
sbio
=
kzalloc
(
sizeof
(
*
sbio
),
GFP_
KERNEL
);
if
(
!
sbio
)
goto
nomem
;
sctx
->
bios
[
i
]
=
sbio
;
...
...
@@ -1654,7 +1654,7 @@ static int scrub_add_page_to_wr_bio(struct scrub_ctx *sctx,
again:
if
(
!
wr_ctx
->
wr_curr_bio
)
{
wr_ctx
->
wr_curr_bio
=
kzalloc
(
sizeof
(
*
wr_ctx
->
wr_curr_bio
),
GFP_
NOFS
);
GFP_
KERNEL
);
if
(
!
wr_ctx
->
wr_curr_bio
)
{
mutex_unlock
(
&
wr_ctx
->
wr_lock
);
return
-
ENOMEM
;
...
...
@@ -1671,7 +1671,8 @@ static int scrub_add_page_to_wr_bio(struct scrub_ctx *sctx,
sbio
->
dev
=
wr_ctx
->
tgtdev
;
bio
=
sbio
->
bio
;
if
(
!
bio
)
{
bio
=
btrfs_io_bio_alloc
(
GFP_NOFS
,
wr_ctx
->
pages_per_wr_bio
);
bio
=
btrfs_io_bio_alloc
(
GFP_KERNEL
,
wr_ctx
->
pages_per_wr_bio
);
if
(
!
bio
)
{
mutex_unlock
(
&
wr_ctx
->
wr_lock
);
return
-
ENOMEM
;
...
...
@@ -2076,7 +2077,8 @@ static int scrub_add_page_to_rd_bio(struct scrub_ctx *sctx,
sbio
->
dev
=
spage
->
dev
;
bio
=
sbio
->
bio
;
if
(
!
bio
)
{
bio
=
btrfs_io_bio_alloc
(
GFP_NOFS
,
sctx
->
pages_per_rd_bio
);
bio
=
btrfs_io_bio_alloc
(
GFP_KERNEL
,
sctx
->
pages_per_rd_bio
);
if
(
!
bio
)
return
-
ENOMEM
;
sbio
->
bio
=
bio
;
...
...
@@ -2241,7 +2243,7 @@ static int scrub_pages(struct scrub_ctx *sctx, u64 logical, u64 len,
struct
scrub_block
*
sblock
;
int
index
;
sblock
=
kzalloc
(
sizeof
(
*
sblock
),
GFP_
NOFS
);
sblock
=
kzalloc
(
sizeof
(
*
sblock
),
GFP_
KERNEL
);
if
(
!
sblock
)
{
spin_lock
(
&
sctx
->
stat_lock
);
sctx
->
stat
.
malloc_errors
++
;
...
...
@@ -2259,7 +2261,7 @@ static int scrub_pages(struct scrub_ctx *sctx, u64 logical, u64 len,
struct
scrub_page
*
spage
;
u64
l
=
min_t
(
u64
,
len
,
PAGE_SIZE
);
spage
=
kzalloc
(
sizeof
(
*
spage
),
GFP_
NOFS
);
spage
=
kzalloc
(
sizeof
(
*
spage
),
GFP_
KERNEL
);
if
(
!
spage
)
{
leave_nomem:
spin_lock
(
&
sctx
->
stat_lock
);
...
...
@@ -2286,7 +2288,7 @@ static int scrub_pages(struct scrub_ctx *sctx, u64 logical, u64 len,
spage
->
have_csum
=
0
;
}
sblock
->
page_count
++
;
spage
->
page
=
alloc_page
(
GFP_
NOFS
);
spage
->
page
=
alloc_page
(
GFP_
KERNEL
);
if
(
!
spage
->
page
)
goto
leave_nomem
;
len
-=
l
;
...
...
@@ -2541,7 +2543,7 @@ static int scrub_pages_for_parity(struct scrub_parity *sparity,
struct
scrub_block
*
sblock
;
int
index
;
sblock
=
kzalloc
(
sizeof
(
*
sblock
),
GFP_
NOFS
);
sblock
=
kzalloc
(
sizeof
(
*
sblock
),
GFP_
KERNEL
);
if
(
!
sblock
)
{
spin_lock
(
&
sctx
->
stat_lock
);
sctx
->
stat
.
malloc_errors
++
;
...
...
@@ -2561,7 +2563,7 @@ static int scrub_pages_for_parity(struct scrub_parity *sparity,
struct
scrub_page
*
spage
;
u64
l
=
min_t
(
u64
,
len
,
PAGE_SIZE
);
spage
=
kzalloc
(
sizeof
(
*
spage
),
GFP_
NOFS
);
spage
=
kzalloc
(
sizeof
(
*
spage
),
GFP_
KERNEL
);
if
(
!
spage
)
{
leave_nomem:
spin_lock
(
&
sctx
->
stat_lock
);
...
...
@@ -2591,7 +2593,7 @@ static int scrub_pages_for_parity(struct scrub_parity *sparity,
spage
->
have_csum
=
0
;
}
sblock
->
page_count
++
;
spage
->
page
=
alloc_page
(
GFP_
NOFS
);
spage
->
page
=
alloc_page
(
GFP_
KERNEL
);
if
(
!
spage
->
page
)
goto
leave_nomem
;
len
-=
l
;
...
...
fs/btrfs/send.c
浏览文件 @
e22b3d1f
...
...
@@ -304,7 +304,7 @@ static struct fs_path *fs_path_alloc(void)
{
struct
fs_path
*
p
;
p
=
kmalloc
(
sizeof
(
*
p
),
GFP_
NOFS
);
p
=
kmalloc
(
sizeof
(
*
p
),
GFP_
KERNEL
);
if
(
!
p
)
return
NULL
;
p
->
reversed
=
0
;
...
...
@@ -363,11 +363,11 @@ static int fs_path_ensure_buf(struct fs_path *p, int len)
* First time the inline_buf does not suffice
*/
if
(
p
->
buf
==
p
->
inline_buf
)
{
tmp_buf
=
kmalloc
(
len
,
GFP_
NOFS
);
tmp_buf
=
kmalloc
(
len
,
GFP_
KERNEL
);
if
(
tmp_buf
)
memcpy
(
tmp_buf
,
p
->
buf
,
old_buf_len
);
}
else
{
tmp_buf
=
krealloc
(
p
->
buf
,
len
,
GFP_
NOFS
);
tmp_buf
=
krealloc
(
p
->
buf
,
len
,
GFP_
KERNEL
);
}
if
(
!
tmp_buf
)
return
-
ENOMEM
;
...
...
@@ -995,7 +995,7 @@ static int iterate_dir_item(struct btrfs_root *root, struct btrfs_path *path,
* values are small.
*/
buf_len
=
PATH_MAX
;
buf
=
kmalloc
(
buf_len
,
GFP_
NOFS
);
buf
=
kmalloc
(
buf_len
,
GFP_
KERNEL
);
if
(
!
buf
)
{
ret
=
-
ENOMEM
;
goto
out
;
...
...
@@ -1042,7 +1042,7 @@ static int iterate_dir_item(struct btrfs_root *root, struct btrfs_path *path,
buf
=
NULL
;
}
else
{
char
*
tmp
=
krealloc
(
buf
,
buf_len
,
GFP_NOFS
|
__GFP_NOWARN
);
GFP_KERNEL
|
__GFP_NOWARN
);
if
(
!
tmp
)
kfree
(
buf
);
...
...
@@ -1303,7 +1303,7 @@ static int find_extent_clone(struct send_ctx *sctx,
/* We only use this path under the commit sem */
tmp_path
->
need_commit_sem
=
0
;
backref_ctx
=
kmalloc
(
sizeof
(
*
backref_ctx
),
GFP_
NOFS
);
backref_ctx
=
kmalloc
(
sizeof
(
*
backref_ctx
),
GFP_
KERNEL
);
if
(
!
backref_ctx
)
{
ret
=
-
ENOMEM
;
goto
out
;
...
...
@@ -1984,7 +1984,7 @@ static int name_cache_insert(struct send_ctx *sctx,
nce_head
=
radix_tree_lookup
(
&
sctx
->
name_cache
,
(
unsigned
long
)
nce
->
ino
);
if
(
!
nce_head
)
{
nce_head
=
kmalloc
(
sizeof
(
*
nce_head
),
GFP_
NOFS
);
nce_head
=
kmalloc
(
sizeof
(
*
nce_head
),
GFP_
KERNEL
);
if
(
!
nce_head
)
{
kfree
(
nce
);
return
-
ENOMEM
;
...
...
@@ -2179,7 +2179,7 @@ static int __get_cur_name_and_parent(struct send_ctx *sctx,
/*
* Store the result of the lookup in the name cache.
*/
nce
=
kmalloc
(
sizeof
(
*
nce
)
+
fs_path_len
(
dest
)
+
1
,
GFP_
NOFS
);
nce
=
kmalloc
(
sizeof
(
*
nce
)
+
fs_path_len
(
dest
)
+
1
,
GFP_
KERNEL
);
if
(
!
nce
)
{
ret
=
-
ENOMEM
;
goto
out
;
...
...
@@ -2315,7 +2315,7 @@ static int send_subvol_begin(struct send_ctx *sctx)
if
(
!
path
)
return
-
ENOMEM
;
name
=
kmalloc
(
BTRFS_PATH_NAME_MAX
,
GFP_
NOFS
);
name
=
kmalloc
(
BTRFS_PATH_NAME_MAX
,
GFP_
KERNEL
);
if
(
!
name
)
{
btrfs_free_path
(
path
);
return
-
ENOMEM
;
...
...
@@ -2730,7 +2730,7 @@ static int __record_ref(struct list_head *head, u64 dir,
{
struct
recorded_ref
*
ref
;
ref
=
kmalloc
(
sizeof
(
*
ref
),
GFP_
NOFS
);
ref
=
kmalloc
(
sizeof
(
*
ref
),
GFP_
KERNEL
);
if
(
!
ref
)
return
-
ENOMEM
;
...
...
@@ -2755,7 +2755,7 @@ static int dup_ref(struct recorded_ref *ref, struct list_head *list)
{
struct
recorded_ref
*
new
;
new
=
kmalloc
(
sizeof
(
*
ref
),
GFP_
NOFS
);
new
=
kmalloc
(
sizeof
(
*
ref
),
GFP_
KERNEL
);
if
(
!
new
)
return
-
ENOMEM
;
...
...
@@ -2818,7 +2818,7 @@ add_orphan_dir_info(struct send_ctx *sctx, u64 dir_ino)
struct
rb_node
*
parent
=
NULL
;
struct
orphan_dir_info
*
entry
,
*
odi
;
odi
=
kmalloc
(
sizeof
(
*
odi
),
GFP_
NOFS
);
odi
=
kmalloc
(
sizeof
(
*
odi
),
GFP_
KERNEL
);
if
(
!
odi
)
return
ERR_PTR
(
-
ENOMEM
);
odi
->
ino
=
dir_ino
;
...
...
@@ -2973,7 +2973,7 @@ static int add_waiting_dir_move(struct send_ctx *sctx, u64 ino, bool orphanized)
struct
rb_node
*
parent
=
NULL
;
struct
waiting_dir_move
*
entry
,
*
dm
;
dm
=
kmalloc
(
sizeof
(
*
dm
),
GFP_
NOFS
);
dm
=
kmalloc
(
sizeof
(
*
dm
),
GFP_
KERNEL
);
if
(
!
dm
)
return
-
ENOMEM
;
dm
->
ino
=
ino
;
...
...
@@ -3040,7 +3040,7 @@ static int add_pending_dir_move(struct send_ctx *sctx,
int
exists
=
0
;
int
ret
;
pm
=
kmalloc
(
sizeof
(
*
pm
),
GFP_
NOFS
);
pm
=
kmalloc
(
sizeof
(
*
pm
),
GFP_
KERNEL
);
if
(
!
pm
)
return
-
ENOMEM
;
pm
->
parent_ino
=
parent_ino
;
...
...
@@ -4280,7 +4280,7 @@ static int __find_xattr(int num, struct btrfs_key *di_key,
strncmp
(
name
,
ctx
->
name
,
name_len
)
==
0
)
{
ctx
->
found_idx
=
num
;
ctx
->
found_data_len
=
data_len
;
ctx
->
found_data
=
kmemdup
(
data
,
data_len
,
GFP_
NOFS
);
ctx
->
found_data
=
kmemdup
(
data
,
data_len
,
GFP_
KERNEL
);
if
(
!
ctx
->
found_data
)
return
-
ENOMEM
;
return
1
;
...
...
@@ -4481,7 +4481,7 @@ static ssize_t fill_read_buf(struct send_ctx *sctx, u64 offset, u32 len)
while
(
index
<=
last_index
)
{
unsigned
cur_len
=
min_t
(
unsigned
,
len
,
PAGE_CACHE_SIZE
-
pg_offset
);
page
=
find_or_create_page
(
inode
->
i_mapping
,
index
,
GFP_
NOFS
);
page
=
find_or_create_page
(
inode
->
i_mapping
,
index
,
GFP_
KERNEL
);
if
(
!
page
)
{
ret
=
-
ENOMEM
;
break
;
...
...
@@ -5989,7 +5989,7 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
goto
out
;
}
sctx
=
kzalloc
(
sizeof
(
struct
send_ctx
),
GFP_
NOFS
);
sctx
=
kzalloc
(
sizeof
(
struct
send_ctx
),
GFP_
KERNEL
);
if
(
!
sctx
)
{
ret
=
-
ENOMEM
;
goto
out
;
...
...
@@ -5997,7 +5997,7 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
INIT_LIST_HEAD
(
&
sctx
->
new_refs
);
INIT_LIST_HEAD
(
&
sctx
->
deleted_refs
);
INIT_RADIX_TREE
(
&
sctx
->
name_cache
,
GFP_
NOFS
);
INIT_RADIX_TREE
(
&
sctx
->
name_cache
,
GFP_
KERNEL
);
INIT_LIST_HEAD
(
&
sctx
->
name_cache_list
);
sctx
->
flags
=
arg
->
flags
;
...
...
fs/btrfs/volumes.c
浏览文件 @
e22b3d1f
...
...
@@ -138,7 +138,7 @@ static struct btrfs_fs_devices *__alloc_fs_devices(void)
{
struct
btrfs_fs_devices
*
fs_devs
;
fs_devs
=
kzalloc
(
sizeof
(
*
fs_devs
),
GFP_
NOFS
);
fs_devs
=
kzalloc
(
sizeof
(
*
fs_devs
),
GFP_
KERNEL
);
if
(
!
fs_devs
)
return
ERR_PTR
(
-
ENOMEM
);
...
...
@@ -220,7 +220,7 @@ static struct btrfs_device *__alloc_device(void)
{
struct
btrfs_device
*
dev
;
dev
=
kzalloc
(
sizeof
(
*
dev
),
GFP_
NOFS
);
dev
=
kzalloc
(
sizeof
(
*
dev
),
GFP_
KERNEL
);
if
(
!
dev
)
return
ERR_PTR
(
-
ENOMEM
);
...
...
@@ -733,7 +733,8 @@ static struct btrfs_fs_devices *clone_fs_devices(struct btrfs_fs_devices *orig)
* uuid mutex so nothing we touch in here is going to disappear.
*/
if
(
orig_dev
->
name
)
{
name
=
rcu_string_strdup
(
orig_dev
->
name
->
str
,
GFP_NOFS
);
name
=
rcu_string_strdup
(
orig_dev
->
name
->
str
,
GFP_KERNEL
);
if
(
!
name
)
{
kfree
(
device
);
goto
error
;
...
...
@@ -2287,7 +2288,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
goto
error
;
}
name
=
rcu_string_strdup
(
device_path
,
GFP_
NOFS
);
name
=
rcu_string_strdup
(
device_path
,
GFP_
KERNEL
);
if
(
!
name
)
{
kfree
(
device
);
ret
=
-
ENOMEM
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录