Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
0378c405
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看板
提交
0378c405
编写于
1月 12, 2011
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch ncpfs
merge dentry_operations for root and non-root Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
98cd3fb0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
13 deletion
+6
-13
fs/ncpfs/dir.c
fs/ncpfs/dir.c
+4
-11
fs/ncpfs/inode.c
fs/ncpfs/inode.c
+1
-1
include/linux/ncp_fs.h
include/linux/ncp_fs.h
+1
-1
未找到文件。
fs/ncpfs/dir.c
浏览文件 @
0378c405
...
...
@@ -82,7 +82,7 @@ static int ncp_compare_dentry(const struct dentry *, const struct inode *,
unsigned
int
,
const
char
*
,
const
struct
qstr
*
);
static
int
ncp_delete_dentry
(
const
struct
dentry
*
);
static
const
struct
dentry_operations
ncp_dentry_operations
=
const
struct
dentry_operations
ncp_dentry_operations
=
{
.
d_revalidate
=
ncp_lookup_validate
,
.
d_hash
=
ncp_hash_dentry
,
...
...
@@ -90,14 +90,6 @@ static const struct dentry_operations ncp_dentry_operations =
.
d_delete
=
ncp_delete_dentry
,
};
const
struct
dentry_operations
ncp_root_dentry_operations
=
{
.
d_hash
=
ncp_hash_dentry
,
.
d_compare
=
ncp_compare_dentry
,
.
d_delete
=
ncp_delete_dentry
,
};
#define ncp_namespace(i) (NCP_SERVER(i)->name_space[NCP_FINFO(i)->volNumber])
static
inline
int
ncp_preserve_entry_case
(
struct
inode
*
i
,
__u32
nscreator
)
...
...
@@ -309,6 +301,9 @@ ncp_lookup_validate(struct dentry *dentry, struct nameidata *nd)
int
res
,
val
=
0
,
len
;
__u8
__name
[
NCP_MAXPATHLEN
+
1
];
if
(
dentry
==
dentry
->
d_sb
->
s_root
)
return
1
;
if
(
nd
->
flags
&
LOOKUP_RCU
)
return
-
ECHILD
;
...
...
@@ -637,7 +632,6 @@ ncp_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
entry
->
ino
=
iunique
(
dir
->
i_sb
,
2
);
inode
=
ncp_iget
(
dir
->
i_sb
,
entry
);
if
(
inode
)
{
d_set_d_op
(
newdent
,
&
ncp_dentry_operations
);
d_instantiate
(
newdent
,
inode
);
if
(
!
hashed
)
d_rehash
(
newdent
);
...
...
@@ -893,7 +887,6 @@ static struct dentry *ncp_lookup(struct inode *dir, struct dentry *dentry, struc
if
(
inode
)
{
ncp_new_dentry
(
dentry
);
add_entry:
d_set_d_op
(
dentry
,
&
ncp_dentry_operations
);
d_add
(
dentry
,
inode
);
error
=
0
;
}
...
...
fs/ncpfs/inode.c
浏览文件 @
0378c405
...
...
@@ -544,6 +544,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
sb
->
s_blocksize_bits
=
10
;
sb
->
s_magic
=
NCP_SUPER_MAGIC
;
sb
->
s_op
=
&
ncp_sops
;
sb
->
s_d_op
=
&
ncp_dentry_operations
;
sb
->
s_bdi
=
&
server
->
bdi
;
server
=
NCP_SBP
(
sb
);
...
...
@@ -723,7 +724,6 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
sb
->
s_root
=
d_alloc_root
(
root_inode
);
if
(
!
sb
->
s_root
)
goto
out_no_root
;
d_set_d_op
(
sb
->
s_root
,
&
ncp_root_dentry_operations
);
return
0
;
out_no_root:
...
...
include/linux/ncp_fs.h
浏览文件 @
0378c405
...
...
@@ -204,7 +204,7 @@ void ncp_update_inode2(struct inode *, struct ncp_entry_info *);
/* linux/fs/ncpfs/dir.c */
extern
const
struct
inode_operations
ncp_dir_inode_operations
;
extern
const
struct
file_operations
ncp_dir_operations
;
extern
const
struct
dentry_operations
ncp_
root_
dentry_operations
;
extern
const
struct
dentry_operations
ncp_dentry_operations
;
int
ncp_conn_logged_in
(
struct
super_block
*
);
int
ncp_date_dos2unix
(
__le16
time
,
__le16
date
);
void
ncp_date_unix2dos
(
int
unix_date
,
__le16
*
time
,
__le16
*
date
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录