Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
2ea03e1d
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
2ea03e1d
编写于
2月 28, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
9p: v9fs_fid_add() can't fail now
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
aaeb7ecf
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
22 deletion
+11
-22
fs/9p/fid.c
fs/9p/fid.c
+1
-2
fs/9p/fid.h
fs/9p/fid.h
+1
-1
fs/9p/vfs_inode.c
fs/9p/vfs_inode.c
+2
-7
fs/9p/vfs_inode_dotl.c
fs/9p/vfs_inode_dotl.c
+7
-12
未找到文件。
fs/9p/fid.c
浏览文件 @
2ea03e1d
...
...
@@ -41,12 +41,11 @@
*
*/
int
v9fs_fid_add
(
struct
dentry
*
dentry
,
struct
p9_fid
*
fid
)
void
v9fs_fid_add
(
struct
dentry
*
dentry
,
struct
p9_fid
*
fid
)
{
spin_lock
(
&
dentry
->
d_lock
);
hlist_add_head
(
&
fid
->
dlist
,
(
struct
hlist_head
*
)
&
dentry
->
d_fsdata
);
spin_unlock
(
&
dentry
->
d_lock
);
return
0
;
}
/**
...
...
fs/9p/fid.h
浏览文件 @
2ea03e1d
...
...
@@ -25,6 +25,6 @@
struct
p9_fid
*
v9fs_fid_lookup
(
struct
dentry
*
dentry
);
struct
p9_fid
*
v9fs_fid_clone
(
struct
dentry
*
dentry
);
int
v9fs_fid_add
(
struct
dentry
*
dentry
,
struct
p9_fid
*
fid
);
void
v9fs_fid_add
(
struct
dentry
*
dentry
,
struct
p9_fid
*
fid
);
struct
p9_fid
*
v9fs_writeback_fid
(
struct
dentry
*
dentry
);
#endif
fs/9p/vfs_inode.c
浏览文件 @
2ea03e1d
...
...
@@ -692,9 +692,7 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,
"inode creation failed %d
\n
"
,
err
);
goto
error
;
}
err
=
v9fs_fid_add
(
dentry
,
fid
);
if
(
err
<
0
)
goto
error
;
v9fs_fid_add
(
dentry
,
fid
);
d_instantiate
(
dentry
,
inode
);
}
return
ofid
;
...
...
@@ -830,9 +828,7 @@ struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
inode
=
NULL
;
goto
error
;
}
result
=
v9fs_fid_add
(
dentry
,
fid
);
if
(
result
<
0
)
goto
error_iput
;
v9fs_fid_add
(
dentry
,
fid
);
inst_out:
/*
* If we had a rename on the server and a parallel lookup
...
...
@@ -845,7 +841,6 @@ struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
if
(
!
IS_ERR
(
res
))
return
res
;
result
=
PTR_ERR
(
res
);
error_iput:
iput
(
inode
);
error:
p9_client_clunk
(
fid
);
...
...
fs/9p/vfs_inode_dotl.c
浏览文件 @
2ea03e1d
...
...
@@ -333,9 +333,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
/* Now set the ACL based on the default value */
v9fs_set_create_acl
(
inode
,
fid
,
dacl
,
pacl
);
err
=
v9fs_fid_add
(
dentry
,
fid
);
if
(
err
<
0
)
goto
error
;
v9fs_fid_add
(
dentry
,
fid
);
d_instantiate
(
dentry
,
inode
);
v9inode
=
V9FS_I
(
inode
);
...
...
@@ -453,12 +451,11 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir,
err
);
goto
error
;
}
err
=
v9fs_fid_add
(
dentry
,
fid
);
if
(
err
<
0
)
goto
error
;
v9fs_fid_add
(
dentry
,
fid
);
v9fs_set_create_acl
(
inode
,
fid
,
dacl
,
pacl
);
d_instantiate
(
dentry
,
inode
);
fid
=
NULL
;
err
=
0
;
}
else
{
/*
* Not in cached mode. No need to populate
...
...
@@ -747,11 +744,10 @@ v9fs_vfs_symlink_dotl(struct inode *dir, struct dentry *dentry,
err
);
goto
error
;
}
err
=
v9fs_fid_add
(
dentry
,
fid
);
if
(
err
<
0
)
goto
error
;
v9fs_fid_add
(
dentry
,
fid
);
d_instantiate
(
dentry
,
inode
);
fid
=
NULL
;
err
=
0
;
}
else
{
/* Not in cached mode. No need to populate inode with stat */
inode
=
v9fs_get_inode
(
dir
->
i_sb
,
S_IFLNK
,
0
);
...
...
@@ -900,11 +896,10 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
goto
error
;
}
v9fs_set_create_acl
(
inode
,
fid
,
dacl
,
pacl
);
err
=
v9fs_fid_add
(
dentry
,
fid
);
if
(
err
<
0
)
goto
error
;
v9fs_fid_add
(
dentry
,
fid
);
d_instantiate
(
dentry
,
inode
);
fid
=
NULL
;
err
=
0
;
}
else
{
/*
* Not in cached mode. No need to populate inode with stat.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录