Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
77d5a6b7
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看板
提交
77d5a6b7
编写于
5月 29, 2016
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
9p: new helper - v9fs_parent_fid()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
acc29fb8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
16 deletion
+14
-16
fs/9p/fid.h
fs/9p/fid.h
+4
-0
fs/9p/vfs_inode.c
fs/9p/vfs_inode.c
+5
-5
fs/9p/vfs_inode_dotl.c
fs/9p/vfs_inode_dotl.c
+5
-11
未找到文件。
fs/9p/fid.h
浏览文件 @
77d5a6b7
...
...
@@ -24,6 +24,10 @@
#include <linux/list.h>
struct
p9_fid
*
v9fs_fid_lookup
(
struct
dentry
*
dentry
);
static
inline
struct
p9_fid
*
v9fs_parent_fid
(
struct
dentry
*
dentry
)
{
return
v9fs_fid_lookup
(
dentry
->
d_parent
);
}
struct
p9_fid
*
v9fs_fid_clone
(
struct
dentry
*
dentry
);
void
v9fs_fid_add
(
struct
dentry
*
dentry
,
struct
p9_fid
*
fid
);
struct
p9_fid
*
v9fs_writeback_fid
(
struct
dentry
*
dentry
);
...
...
fs/9p/vfs_inode.c
浏览文件 @
77d5a6b7
...
...
@@ -595,7 +595,7 @@ static int v9fs_remove(struct inode *dir, struct dentry *dentry, int flags)
v9ses
=
v9fs_inode2v9ses
(
dir
);
inode
=
d_inode
(
dentry
);
dfid
=
v9fs_
fid_lookup
(
dentry
->
d_parent
);
dfid
=
v9fs_
parent_fid
(
dentry
);
if
(
IS_ERR
(
dfid
))
{
retval
=
PTR_ERR
(
dfid
);
p9_debug
(
P9_DEBUG_VFS
,
"fid lookup failed %d
\n
"
,
retval
);
...
...
@@ -653,7 +653,7 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,
ofid
=
NULL
;
fid
=
NULL
;
name
=
(
char
*
)
dentry
->
d_name
.
name
;
dfid
=
v9fs_
fid_lookup
(
dentry
->
d_parent
);
dfid
=
v9fs_
parent_fid
(
dentry
);
if
(
IS_ERR
(
dfid
))
{
err
=
PTR_ERR
(
dfid
);
p9_debug
(
P9_DEBUG_VFS
,
"fid lookup failed %d
\n
"
,
err
);
...
...
@@ -798,7 +798,7 @@ struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
v9ses
=
v9fs_inode2v9ses
(
dir
);
/* We can walk d_parent because we hold the dir->i_mutex */
dfid
=
v9fs_
fid_lookup
(
dentry
->
d_parent
);
dfid
=
v9fs_
parent_fid
(
dentry
);
if
(
IS_ERR
(
dfid
))
return
ERR_CAST
(
dfid
);
...
...
@@ -975,13 +975,13 @@ v9fs_vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
if
(
IS_ERR
(
oldfid
))
return
PTR_ERR
(
oldfid
);
olddirfid
=
v9fs_
fid_clone
(
old_dentry
->
d_parent
);
olddirfid
=
v9fs_
parent_fid
(
old_dentry
);
if
(
IS_ERR
(
olddirfid
))
{
retval
=
PTR_ERR
(
olddirfid
);
goto
done
;
}
newdirfid
=
v9fs_
fid_clone
(
new_dentry
->
d_parent
);
newdirfid
=
v9fs_
parent_fid
(
new_dentry
);
if
(
IS_ERR
(
newdirfid
))
{
retval
=
PTR_ERR
(
newdirfid
);
goto
clunk_olddir
;
...
...
fs/9p/vfs_inode_dotl.c
浏览文件 @
77d5a6b7
...
...
@@ -273,7 +273,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
p9_debug
(
P9_DEBUG_VFS
,
"name:%s flags:0x%x mode:0x%hx
\n
"
,
name
,
flags
,
omode
);
dfid
=
v9fs_
fid_lookup
(
dentry
->
d_parent
);
dfid
=
v9fs_
parent_fid
(
dentry
);
if
(
IS_ERR
(
dfid
))
{
err
=
PTR_ERR
(
dfid
);
p9_debug
(
P9_DEBUG_VFS
,
"fid lookup failed %d
\n
"
,
err
);
...
...
@@ -389,7 +389,6 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir,
umode_t
mode
;
struct
inode
*
inode
;
struct
p9_qid
qid
;
struct
dentry
*
dir_dentry
;
struct
posix_acl
*
dacl
=
NULL
,
*
pacl
=
NULL
;
p9_debug
(
P9_DEBUG_VFS
,
"name %pd
\n
"
,
dentry
);
...
...
@@ -400,8 +399,7 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir,
if
(
dir
->
i_mode
&
S_ISGID
)
omode
|=
S_ISGID
;
dir_dentry
=
dentry
->
d_parent
;
dfid
=
v9fs_fid_lookup
(
dir_dentry
);
dfid
=
v9fs_parent_fid
(
dentry
);
if
(
IS_ERR
(
dfid
))
{
err
=
PTR_ERR
(
dfid
);
p9_debug
(
P9_DEBUG_VFS
,
"fid lookup failed %d
\n
"
,
err
);
...
...
@@ -691,7 +689,7 @@ v9fs_vfs_symlink_dotl(struct inode *dir, struct dentry *dentry,
p9_debug
(
P9_DEBUG_VFS
,
"%lu,%s,%s
\n
"
,
dir
->
i_ino
,
name
,
symname
);
v9ses
=
v9fs_inode2v9ses
(
dir
);
dfid
=
v9fs_
fid_lookup
(
dentry
->
d_parent
);
dfid
=
v9fs_
parent_fid
(
dentry
);
if
(
IS_ERR
(
dfid
))
{
err
=
PTR_ERR
(
dfid
);
p9_debug
(
P9_DEBUG_VFS
,
"fid lookup failed %d
\n
"
,
err
);
...
...
@@ -762,7 +760,6 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir,
struct
dentry
*
dentry
)
{
int
err
;
struct
dentry
*
dir_dentry
;
struct
p9_fid
*
dfid
,
*
oldfid
;
struct
v9fs_session_info
*
v9ses
;
...
...
@@ -770,8 +767,7 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir,
dir
->
i_ino
,
old_dentry
,
dentry
);
v9ses
=
v9fs_inode2v9ses
(
dir
);
dir_dentry
=
dentry
->
d_parent
;
dfid
=
v9fs_fid_lookup
(
dir_dentry
);
dfid
=
v9fs_parent_fid
(
dentry
);
if
(
IS_ERR
(
dfid
))
return
PTR_ERR
(
dfid
);
...
...
@@ -822,7 +818,6 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
struct
p9_fid
*
fid
=
NULL
,
*
dfid
=
NULL
;
struct
inode
*
inode
;
struct
p9_qid
qid
;
struct
dentry
*
dir_dentry
;
struct
posix_acl
*
dacl
=
NULL
,
*
pacl
=
NULL
;
p9_debug
(
P9_DEBUG_VFS
,
" %lu,%pd mode: %hx MAJOR: %u MINOR: %u
\n
"
,
...
...
@@ -830,8 +825,7 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
MAJOR
(
rdev
),
MINOR
(
rdev
));
v9ses
=
v9fs_inode2v9ses
(
dir
);
dir_dentry
=
dentry
->
d_parent
;
dfid
=
v9fs_fid_lookup
(
dir_dentry
);
dfid
=
v9fs_parent_fid
(
dentry
);
if
(
IS_ERR
(
dfid
))
{
err
=
PTR_ERR
(
dfid
);
p9_debug
(
P9_DEBUG_VFS
,
"fid lookup failed %d
\n
"
,
err
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录