Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
0414b004
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看板
提交
0414b004
编写于
4月 29, 2016
作者:
J
Jaegeuk Kim
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
f2fs: introduce f2fs_kmalloc to wrap kmalloc
This patch adds f2fs_kmalloc. Signed-off-by:
N
Jaegeuk Kim
<
jaegeuk@kernel.org
>
上级
f00d6fa7
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
10 addition
and
5 deletion
+10
-5
fs/f2fs/acl.c
fs/f2fs/acl.c
+2
-2
fs/f2fs/dir.c
fs/f2fs/dir.c
+1
-1
fs/f2fs/f2fs.h
fs/f2fs/f2fs.h
+5
-0
fs/f2fs/gc.c
fs/f2fs/gc.c
+1
-1
fs/f2fs/inline.c
fs/f2fs/inline.c
+1
-1
未找到文件。
fs/f2fs/acl.c
浏览文件 @
0414b004
...
@@ -115,7 +115,7 @@ static void *f2fs_acl_to_disk(const struct posix_acl *acl, size_t *size)
...
@@ -115,7 +115,7 @@ static void *f2fs_acl_to_disk(const struct posix_acl *acl, size_t *size)
struct
f2fs_acl_entry
*
entry
;
struct
f2fs_acl_entry
*
entry
;
int
i
;
int
i
;
f2fs_acl
=
kmalloc
(
sizeof
(
struct
f2fs_acl_header
)
+
acl
->
a_count
*
f2fs_acl
=
f2fs_
kmalloc
(
sizeof
(
struct
f2fs_acl_header
)
+
acl
->
a_count
*
sizeof
(
struct
f2fs_acl_entry
),
GFP_NOFS
);
sizeof
(
struct
f2fs_acl_entry
),
GFP_NOFS
);
if
(
!
f2fs_acl
)
if
(
!
f2fs_acl
)
return
ERR_PTR
(
-
ENOMEM
);
return
ERR_PTR
(
-
ENOMEM
);
...
@@ -175,7 +175,7 @@ static struct posix_acl *__f2fs_get_acl(struct inode *inode, int type,
...
@@ -175,7 +175,7 @@ static struct posix_acl *__f2fs_get_acl(struct inode *inode, int type,
retval
=
f2fs_getxattr
(
inode
,
name_index
,
""
,
NULL
,
0
,
dpage
);
retval
=
f2fs_getxattr
(
inode
,
name_index
,
""
,
NULL
,
0
,
dpage
);
if
(
retval
>
0
)
{
if
(
retval
>
0
)
{
value
=
kmalloc
(
retval
,
GFP_F2FS_ZERO
);
value
=
f2fs_
kmalloc
(
retval
,
GFP_F2FS_ZERO
);
if
(
!
value
)
if
(
!
value
)
return
ERR_PTR
(
-
ENOMEM
);
return
ERR_PTR
(
-
ENOMEM
);
retval
=
f2fs_getxattr
(
inode
,
name_index
,
""
,
value
,
retval
=
f2fs_getxattr
(
inode
,
name_index
,
""
,
value
,
...
...
fs/f2fs/dir.c
浏览文件 @
0414b004
...
@@ -805,7 +805,7 @@ bool f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d,
...
@@ -805,7 +805,7 @@ bool f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d,
int
save_len
=
fstr
->
len
;
int
save_len
=
fstr
->
len
;
int
ret
;
int
ret
;
de_name
.
name
=
kmalloc
(
de_name
.
len
,
GFP_NOFS
);
de_name
.
name
=
f2fs_
kmalloc
(
de_name
.
len
,
GFP_NOFS
);
if
(
!
de_name
.
name
)
if
(
!
de_name
.
name
)
return
false
;
return
false
;
...
...
fs/f2fs/f2fs.h
浏览文件 @
0414b004
...
@@ -1644,6 +1644,11 @@ static inline bool f2fs_may_extent_tree(struct inode *inode)
...
@@ -1644,6 +1644,11 @@ static inline bool f2fs_may_extent_tree(struct inode *inode)
return
S_ISREG
(
inode
->
i_mode
);
return
S_ISREG
(
inode
->
i_mode
);
}
}
static
inline
void
*
f2fs_kmalloc
(
size_t
size
,
gfp_t
flags
)
{
return
kmalloc
(
size
,
flags
);
}
static
inline
void
*
f2fs_kvmalloc
(
size_t
size
,
gfp_t
flags
)
static
inline
void
*
f2fs_kvmalloc
(
size_t
size
,
gfp_t
flags
)
{
{
void
*
ret
;
void
*
ret
;
...
...
fs/f2fs/gc.c
浏览文件 @
0414b004
...
@@ -96,7 +96,7 @@ int start_gc_thread(struct f2fs_sb_info *sbi)
...
@@ -96,7 +96,7 @@ int start_gc_thread(struct f2fs_sb_info *sbi)
dev_t
dev
=
sbi
->
sb
->
s_bdev
->
bd_dev
;
dev_t
dev
=
sbi
->
sb
->
s_bdev
->
bd_dev
;
int
err
=
0
;
int
err
=
0
;
gc_th
=
kmalloc
(
sizeof
(
struct
f2fs_gc_kthread
),
GFP_KERNEL
);
gc_th
=
f2fs_
kmalloc
(
sizeof
(
struct
f2fs_gc_kthread
),
GFP_KERNEL
);
if
(
!
gc_th
)
{
if
(
!
gc_th
)
{
err
=
-
ENOMEM
;
err
=
-
ENOMEM
;
goto
out
;
goto
out
;
...
...
fs/f2fs/inline.c
浏览文件 @
0414b004
...
@@ -465,7 +465,7 @@ static int f2fs_move_rehashed_dirents(struct inode *dir, struct page *ipage,
...
@@ -465,7 +465,7 @@ static int f2fs_move_rehashed_dirents(struct inode *dir, struct page *ipage,
struct
f2fs_inline_dentry
*
backup_dentry
;
struct
f2fs_inline_dentry
*
backup_dentry
;
int
err
;
int
err
;
backup_dentry
=
kmalloc
(
sizeof
(
struct
f2fs_inline_dentry
),
backup_dentry
=
f2fs_
kmalloc
(
sizeof
(
struct
f2fs_inline_dentry
),
GFP_F2FS_ZERO
);
GFP_F2FS_ZERO
);
if
(
!
backup_dentry
)
if
(
!
backup_dentry
)
return
-
ENOMEM
;
return
-
ENOMEM
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录