Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
c139f3ce
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看板
提交
c139f3ce
编写于
5月 09, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ll_setxattr(): get rid of struct file on stack
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
48eddfd5
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
11 addition
and
11 deletion
+11
-11
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/llite/file.c
+9
-6
drivers/staging/lustre/lustre/llite/llite_internal.h
drivers/staging/lustre/lustre/llite/llite_internal.h
+1
-1
drivers/staging/lustre/lustre/llite/xattr.c
drivers/staging/lustre/lustre/llite/xattr.c
+1
-4
未找到文件。
drivers/staging/lustre/lustre/llite/file.c
浏览文件 @
c139f3ce
...
@@ -1351,7 +1351,7 @@ static int ll_lov_recreate_fid(struct inode *inode, unsigned long arg)
...
@@ -1351,7 +1351,7 @@ static int ll_lov_recreate_fid(struct inode *inode, unsigned long arg)
return
ll_lov_recreate
(
inode
,
&
oi
,
ost_idx
);
return
ll_lov_recreate
(
inode
,
&
oi
,
ost_idx
);
}
}
int
ll_lov_setstripe_ea_info
(
struct
inode
*
inode
,
struct
file
*
file
,
int
ll_lov_setstripe_ea_info
(
struct
inode
*
inode
,
struct
dentry
*
dentry
,
int
flags
,
struct
lov_user_md
*
lum
,
int
lum_size
)
int
flags
,
struct
lov_user_md
*
lum
,
int
lum_size
)
{
{
struct
lov_stripe_md
*
lsm
=
NULL
;
struct
lov_stripe_md
*
lsm
=
NULL
;
...
@@ -1368,21 +1368,20 @@ int ll_lov_setstripe_ea_info(struct inode *inode, struct file *file,
...
@@ -1368,21 +1368,20 @@ int ll_lov_setstripe_ea_info(struct inode *inode, struct file *file,
}
}
ll_inode_size_lock
(
inode
);
ll_inode_size_lock
(
inode
);
rc
=
ll_intent_file_open
(
file
->
f_path
.
dentry
,
lum
,
lum_size
,
&
oit
);
rc
=
ll_intent_file_open
(
dentry
,
lum
,
lum_size
,
&
oit
);
if
(
rc
)
if
(
rc
)
goto
out_unlock
;
goto
out_unlock
;
rc
=
oit
.
d
.
lustre
.
it_status
;
rc
=
oit
.
d
.
lustre
.
it_status
;
if
(
rc
<
0
)
if
(
rc
<
0
)
goto
out_req_free
;
goto
out_req_free
;
ll_release_openhandle
(
file
->
f_
dentry
,
&
oit
);
ll_release_openhandle
(
dentry
,
&
oit
);
out_unlock:
out_unlock:
ll_inode_size_unlock
(
inode
);
ll_inode_size_unlock
(
inode
);
ll_intent_release
(
&
oit
);
ll_intent_release
(
&
oit
);
ccc_inode_lsm_put
(
inode
,
lsm
);
ccc_inode_lsm_put
(
inode
,
lsm
);
out:
out:
cl_lov_delay_create_clear
(
&
file
->
f_flags
);
return
rc
;
return
rc
;
out_req_free:
out_req_free:
ptlrpc_req_finished
((
struct
ptlrpc_request
*
)
oit
.
d
.
lustre
.
it_data
);
ptlrpc_req_finished
((
struct
ptlrpc_request
*
)
oit
.
d
.
lustre
.
it_data
);
...
@@ -1496,7 +1495,9 @@ static int ll_lov_setea(struct inode *inode, struct file *file,
...
@@ -1496,7 +1495,9 @@ static int ll_lov_setea(struct inode *inode, struct file *file,
return
-
EFAULT
;
return
-
EFAULT
;
}
}
rc
=
ll_lov_setstripe_ea_info
(
inode
,
file
,
flags
,
lump
,
lum_size
);
rc
=
ll_lov_setstripe_ea_info
(
inode
,
file
->
f_path
.
dentry
,
flags
,
lump
,
lum_size
);
cl_lov_delay_create_clear
(
&
file
->
f_flags
);
OBD_FREE_LARGE
(
lump
,
lum_size
);
OBD_FREE_LARGE
(
lump
,
lum_size
);
return
rc
;
return
rc
;
...
@@ -1523,7 +1524,9 @@ static int ll_lov_setstripe(struct inode *inode, struct file *file,
...
@@ -1523,7 +1524,9 @@ static int ll_lov_setstripe(struct inode *inode, struct file *file,
return
-
EFAULT
;
return
-
EFAULT
;
}
}
rc
=
ll_lov_setstripe_ea_info
(
inode
,
file
,
flags
,
lumv1
,
lum_size
);
rc
=
ll_lov_setstripe_ea_info
(
inode
,
file
->
f_path
.
dentry
,
flags
,
lumv1
,
lum_size
);
cl_lov_delay_create_clear
(
&
file
->
f_flags
);
if
(
rc
==
0
)
{
if
(
rc
==
0
)
{
struct
lov_stripe_md
*
lsm
;
struct
lov_stripe_md
*
lsm
;
__u32
gen
;
__u32
gen
;
...
...
drivers/staging/lustre/lustre/llite/llite_internal.h
浏览文件 @
c139f3ce
...
@@ -763,7 +763,7 @@ struct posix_acl *ll_get_acl(struct inode *inode, int type);
...
@@ -763,7 +763,7 @@ struct posix_acl *ll_get_acl(struct inode *inode, int type);
int
ll_inode_permission
(
struct
inode
*
inode
,
int
mask
);
int
ll_inode_permission
(
struct
inode
*
inode
,
int
mask
);
int
ll_lov_setstripe_ea_info
(
struct
inode
*
inode
,
struct
file
*
file
,
int
ll_lov_setstripe_ea_info
(
struct
inode
*
inode
,
struct
dentry
*
dentry
,
int
flags
,
struct
lov_user_md
*
lum
,
int
flags
,
struct
lov_user_md
*
lum
,
int
lum_size
);
int
lum_size
);
int
ll_lov_getstripe_ea_info
(
struct
inode
*
inode
,
const
char
*
filename
,
int
ll_lov_getstripe_ea_info
(
struct
inode
*
inode
,
const
char
*
filename
,
...
...
drivers/staging/lustre/lustre/llite/xattr.c
浏览文件 @
c139f3ce
...
@@ -241,14 +241,11 @@ int ll_setxattr(struct dentry *dentry, const char *name,
...
@@ -241,14 +241,11 @@ int ll_setxattr(struct dentry *dentry, const char *name,
lump
->
lmm_stripe_offset
=
-
1
;
lump
->
lmm_stripe_offset
=
-
1
;
if
(
lump
!=
NULL
&&
S_ISREG
(
inode
->
i_mode
))
{
if
(
lump
!=
NULL
&&
S_ISREG
(
inode
->
i_mode
))
{
struct
file
f
;
int
flags
=
FMODE_WRITE
;
int
flags
=
FMODE_WRITE
;
int
lum_size
=
(
lump
->
lmm_magic
==
LOV_USER_MAGIC_V1
)
?
int
lum_size
=
(
lump
->
lmm_magic
==
LOV_USER_MAGIC_V1
)
?
sizeof
(
*
lump
)
:
sizeof
(
struct
lov_user_md_v3
);
sizeof
(
*
lump
)
:
sizeof
(
struct
lov_user_md_v3
);
memset
(
&
f
,
0
,
sizeof
(
f
));
/* f.f_flags is used below */
rc
=
ll_lov_setstripe_ea_info
(
inode
,
dentry
,
flags
,
lump
,
f
.
f_dentry
=
dentry
;
rc
=
ll_lov_setstripe_ea_info
(
inode
,
&
f
,
flags
,
lump
,
lum_size
);
lum_size
);
/* b10667: rc always be 0 here for now */
/* b10667: rc always be 0 here for now */
rc
=
0
;
rc
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录