Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
158998b6
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
158998b6
编写于
8月 24, 2006
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SUNRPC: Make rpc_mkpipe() take the parent dentry as an argument
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
5dd3177a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
26 deletion
+27
-26
fs/nfs/idmap.c
fs/nfs/idmap.c
+1
-5
include/linux/sunrpc/rpc_pipe_fs.h
include/linux/sunrpc/rpc_pipe_fs.h
+1
-1
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/auth_gss/auth_gss.c
+2
-5
net/sunrpc/rpc_pipe.c
net/sunrpc/rpc_pipe.c
+23
-15
未找到文件。
fs/nfs/idmap.c
浏览文件 @
158998b6
...
...
@@ -84,7 +84,6 @@ struct idmap_hashtable {
};
struct
idmap
{
char
idmap_path
[
48
];
struct
dentry
*
idmap_dentry
;
wait_queue_head_t
idmap_wq
;
struct
idmap_msg
idmap_im
;
...
...
@@ -119,10 +118,7 @@ nfs_idmap_new(struct nfs_client *clp)
if
((
idmap
=
kzalloc
(
sizeof
(
*
idmap
),
GFP_KERNEL
))
==
NULL
)
return
-
ENOMEM
;
snprintf
(
idmap
->
idmap_path
,
sizeof
(
idmap
->
idmap_path
),
"%s/idmap"
,
clp
->
cl_rpcclient
->
cl_pathname
);
idmap
->
idmap_dentry
=
rpc_mkpipe
(
idmap
->
idmap_path
,
idmap
->
idmap_dentry
=
rpc_mkpipe
(
clp
->
cl_rpcclient
->
cl_dentry
,
"idmap"
,
idmap
,
&
idmap_upcall_ops
,
0
);
if
(
IS_ERR
(
idmap
->
idmap_dentry
))
{
error
=
PTR_ERR
(
idmap
->
idmap_dentry
);
...
...
include/linux/sunrpc/rpc_pipe_fs.h
浏览文件 @
158998b6
...
...
@@ -43,7 +43,7 @@ extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *);
extern
struct
dentry
*
rpc_mkdir
(
char
*
,
struct
rpc_clnt
*
);
extern
int
rpc_rmdir
(
struct
dentry
*
);
extern
struct
dentry
*
rpc_mkpipe
(
char
*
,
void
*
,
struct
rpc_pipe_ops
*
,
int
flags
);
extern
struct
dentry
*
rpc_mkpipe
(
struct
dentry
*
,
const
char
*
,
void
*
,
struct
rpc_pipe_ops
*
,
int
flags
);
extern
int
rpc_unlink
(
struct
dentry
*
);
extern
struct
vfsmount
*
rpc_get_mount
(
void
);
extern
void
rpc_put_mount
(
void
);
...
...
net/sunrpc/auth_gss/auth_gss.c
浏览文件 @
158998b6
...
...
@@ -88,7 +88,6 @@ struct gss_auth {
struct
list_head
upcalls
;
struct
rpc_clnt
*
client
;
struct
dentry
*
dentry
;
char
path
[
48
];
spinlock_t
lock
;
};
...
...
@@ -690,10 +689,8 @@ gss_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor)
if
(
err
)
goto
err_put_mech
;
snprintf
(
gss_auth
->
path
,
sizeof
(
gss_auth
->
path
),
"%s/%s"
,
clnt
->
cl_pathname
,
gss_auth
->
mech
->
gm_name
);
gss_auth
->
dentry
=
rpc_mkpipe
(
gss_auth
->
path
,
clnt
,
&
gss_upcall_ops
,
RPC_PIPE_WAIT_FOR_OPEN
);
gss_auth
->
dentry
=
rpc_mkpipe
(
clnt
->
cl_dentry
,
gss_auth
->
mech
->
gm_name
,
clnt
,
&
gss_upcall_ops
,
RPC_PIPE_WAIT_FOR_OPEN
);
if
(
IS_ERR
(
gss_auth
->
dentry
))
{
err
=
PTR_ERR
(
gss_auth
->
dentry
);
goto
err_put_mech
;
...
...
net/sunrpc/rpc_pipe.c
浏览文件 @
158998b6
...
...
@@ -621,17 +621,13 @@ __rpc_rmdir(struct inode *dir, struct dentry *dentry)
}
static
struct
dentry
*
rpc_lookup_
negative
(
char
*
path
,
struct
nameidata
*
nd
)
rpc_lookup_
create
(
struct
dentry
*
parent
,
const
char
*
name
,
int
len
)
{
struct
inode
*
dir
=
parent
->
d_inode
;
struct
dentry
*
dentry
;
struct
inode
*
dir
;
int
error
;
if
((
error
=
rpc_lookup_parent
(
path
,
nd
))
!=
0
)
return
ERR_PTR
(
error
);
dir
=
nd
->
dentry
->
d_inode
;
mutex_lock_nested
(
&
dir
->
i_mutex
,
I_MUTEX_PARENT
);
dentry
=
lookup_one_len
(
n
d
->
last
.
name
,
nd
->
dentry
,
nd
->
last
.
len
);
dentry
=
lookup_one_len
(
n
ame
,
parent
,
len
);
if
(
IS_ERR
(
dentry
))
goto
out_err
;
if
(
dentry
->
d_inode
)
{
...
...
@@ -642,7 +638,20 @@ rpc_lookup_negative(char *path, struct nameidata *nd)
return
dentry
;
out_err:
mutex_unlock
(
&
dir
->
i_mutex
);
rpc_release_path
(
nd
);
return
dentry
;
}
static
struct
dentry
*
rpc_lookup_negative
(
char
*
path
,
struct
nameidata
*
nd
)
{
struct
dentry
*
dentry
;
int
error
;
if
((
error
=
rpc_lookup_parent
(
path
,
nd
))
!=
0
)
return
ERR_PTR
(
error
);
dentry
=
rpc_lookup_create
(
nd
->
dentry
,
nd
->
last
.
name
,
nd
->
last
.
len
);
if
(
IS_ERR
(
dentry
))
rpc_release_path
(
nd
);
return
dentry
;
}
...
...
@@ -701,17 +710,16 @@ rpc_rmdir(struct dentry *dentry)
}
struct
dentry
*
rpc_mkpipe
(
char
*
path
,
void
*
private
,
struct
rpc_pipe_ops
*
ops
,
int
flags
)
rpc_mkpipe
(
struct
dentry
*
parent
,
const
char
*
name
,
void
*
private
,
struct
rpc_pipe_ops
*
ops
,
int
flags
)
{
struct
nameidata
nd
;
struct
dentry
*
dentry
;
struct
inode
*
dir
,
*
inode
;
struct
rpc_inode
*
rpci
;
dentry
=
rpc_lookup_
negative
(
path
,
&
nd
);
dentry
=
rpc_lookup_
create
(
parent
,
name
,
strlen
(
name
)
);
if
(
IS_ERR
(
dentry
))
return
dentry
;
dir
=
nd
.
dentry
->
d_inode
;
dir
=
parent
->
d_inode
;
inode
=
rpc_get_inode
(
dir
->
i_sb
,
S_IFSOCK
|
S_IRUSR
|
S_IWUSR
);
if
(
!
inode
)
goto
err_dput
;
...
...
@@ -726,13 +734,13 @@ rpc_mkpipe(char *path, void *private, struct rpc_pipe_ops *ops, int flags)
dget
(
dentry
);
out:
mutex_unlock
(
&
dir
->
i_mutex
);
rpc_release_path
(
&
nd
);
return
dentry
;
err_dput:
dput
(
dentry
);
dentry
=
ERR_PTR
(
-
ENOMEM
);
printk
(
KERN_WARNING
"%s: %s() failed to create pipe %s (errno = %d)
\n
"
,
__FILE__
,
__FUNCTION__
,
path
,
-
ENOMEM
);
printk
(
KERN_WARNING
"%s: %s() failed to create pipe %s/%s (errno = %d)
\n
"
,
__FILE__
,
__FUNCTION__
,
parent
->
d_name
.
name
,
name
,
-
ENOMEM
);
goto
out
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录