Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
6fa67e70
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看板
提交
6fa67e70
编写于
7月 31, 2016
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
get rid of 'parent' argument of ->d_compare()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
d3fe1985
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
40 addition
and
38 deletion
+40
-38
Documentation/filesystems/Locking
Documentation/filesystems/Locking
+1
-1
Documentation/filesystems/porting
Documentation/filesystems/porting
+7
-0
Documentation/filesystems/vfs.txt
Documentation/filesystems/vfs.txt
+1
-1
drivers/staging/lustre/lustre/llite/dcache.c
drivers/staging/lustre/lustre/llite/dcache.c
+1
-1
fs/adfs/dir.c
fs/adfs/dir.c
+1
-1
fs/affs/namei.c
fs/affs/namei.c
+4
-4
fs/cifs/dir.c
fs/cifs/dir.c
+1
-1
fs/dcache.c
fs/dcache.c
+2
-2
fs/efivarfs/super.c
fs/efivarfs/super.c
+1
-2
fs/fat/namei_msdos.c
fs/fat/namei_msdos.c
+1
-1
fs/fat/namei_vfat.c
fs/fat/namei_vfat.c
+2
-2
fs/hfs/hfs_fs.h
fs/hfs/hfs_fs.h
+1
-1
fs/hfs/string.c
fs/hfs/string.c
+1
-1
fs/hfsplus/hfsplus_fs.h
fs/hfsplus/hfsplus_fs.h
+1
-2
fs/hfsplus/unicode.c
fs/hfsplus/unicode.c
+1
-1
fs/hpfs/dentry.c
fs/hpfs/dentry.c
+1
-1
fs/isofs/inode.c
fs/isofs/inode.c
+6
-9
fs/isofs/namei.c
fs/isofs/namei.c
+1
-1
fs/jfs/namei.c
fs/jfs/namei.c
+1
-1
fs/ncpfs/dir.c
fs/ncpfs/dir.c
+3
-3
fs/proc/proc_sysctl.c
fs/proc/proc_sysctl.c
+1
-1
include/linux/dcache.h
include/linux/dcache.h
+1
-1
未找到文件。
Documentation/filesystems/Locking
浏览文件 @
6fa67e70
...
...
@@ -12,7 +12,7 @@ prototypes:
int (*d_revalidate)(struct dentry *, unsigned int);
int (*d_weak_revalidate)(struct dentry *, unsigned int);
int (*d_hash)(const struct dentry *, struct qstr *);
int (*d_compare)(const struct dentry *,
const struct dentry *,
int (*d_compare)(const struct dentry *,
unsigned int, const char *, const struct qstr *);
int (*d_delete)(struct dentry *);
int (*d_init)(struct dentry *);
...
...
Documentation/filesystems/porting
浏览文件 @
6fa67e70
...
...
@@ -585,3 +585,10 @@ in your dentry operations instead.
in the instances. Rationale: !@#!@# security_d_instantiate() needs to be
called before we attach dentry to inode and !@#!@##!@$!$#!@#$!@$!@$ smack
->d_instantiate() uses not just ->getxattr() but ->setxattr() as well.
--
[mandatory]
->d_compare() doesn't get parent as a separate argument anymore. If you
used it for finding the struct super_block involved, dentry->d_sb will
work just as well; if it's something more complicated, use dentry->d_parent.
Just be careful not to assume that fetching it more than once will yield
the same value - in RCU mode it could change under you.
Documentation/filesystems/vfs.txt
浏览文件 @
6fa67e70
...
...
@@ -931,7 +931,7 @@ struct dentry_operations {
int (*d_revalidate)(struct dentry *, unsigned int);
int (*d_weak_revalidate)(struct dentry *, unsigned int);
int (*d_hash)(const struct dentry *, struct qstr *);
int (*d_compare)(const struct dentry *,
const struct dentry *,
int (*d_compare)(const struct dentry *,
unsigned int, const char *, const struct qstr *);
int (*d_delete)(const struct dentry *);
int (*d_init)(struct dentry *);
...
...
drivers/staging/lustre/lustre/llite/dcache.c
浏览文件 @
6fa67e70
...
...
@@ -78,7 +78,7 @@ static void ll_release(struct dentry *de)
* INVALID) so d_lookup() matches it, but we have no lock on it (so
* lock_match() fails) and we spin around real_lookup().
*/
static
int
ll_dcompare
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
ll_dcompare
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
...
...
fs/adfs/dir.c
浏览文件 @
6fa67e70
...
...
@@ -227,7 +227,7 @@ adfs_hash(const struct dentry *parent, struct qstr *qstr)
* requirements of the underlying filesystem.
*/
static
int
adfs_compare
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
adfs_compare
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
int
i
;
...
...
fs/affs/namei.c
浏览文件 @
6fa67e70
...
...
@@ -14,11 +14,11 @@ typedef int (*toupper_t)(int);
static
int
affs_toupper
(
int
ch
);
static
int
affs_hash_dentry
(
const
struct
dentry
*
,
struct
qstr
*
);
static
int
affs_compare_dentry
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
affs_compare_dentry
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
);
static
int
affs_intl_toupper
(
int
ch
);
static
int
affs_intl_hash_dentry
(
const
struct
dentry
*
,
struct
qstr
*
);
static
int
affs_intl_compare_dentry
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
affs_intl_compare_dentry
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
);
const
struct
dentry_operations
affs_dentry_operations
=
{
...
...
@@ -131,7 +131,7 @@ static inline int __affs_compare_dentry(unsigned int len,
}
static
int
affs_compare_dentry
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
affs_compare_dentry
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
...
...
@@ -140,7 +140,7 @@ affs_compare_dentry(const struct dentry *parent, const struct dentry *dentry,
}
static
int
affs_intl_compare_dentry
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
affs_intl_compare_dentry
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
return
__affs_compare_dentry
(
len
,
str
,
name
,
affs_intl_toupper
,
...
...
fs/cifs/dir.c
浏览文件 @
6fa67e70
...
...
@@ -903,7 +903,7 @@ static int cifs_ci_hash(const struct dentry *dentry, struct qstr *q)
return
0
;
}
static
int
cifs_ci_compare
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
cifs_ci_compare
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
struct
nls_table
*
codepage
=
CIFS_SB
(
dentry
->
d_sb
)
->
local_nls
;
...
...
fs/dcache.c
浏览文件 @
6fa67e70
...
...
@@ -2047,7 +2047,7 @@ static inline bool d_same_name(const struct dentry *dentry,
return
false
;
return
dentry_cmp
(
dentry
,
name
->
name
,
name
->
len
)
==
0
;
}
return
parent
->
d_op
->
d_compare
(
parent
,
dentry
,
return
parent
->
d_op
->
d_compare
(
dentry
,
dentry
->
d_name
.
len
,
dentry
->
d_name
.
name
,
name
)
==
0
;
}
...
...
@@ -2150,7 +2150,7 @@ struct dentry *__d_lookup_rcu(const struct dentry *parent,
cpu_relax
();
goto
seqretry
;
}
if
(
parent
->
d_op
->
d_compare
(
parent
,
dentry
,
if
(
parent
->
d_op
->
d_compare
(
dentry
,
tlen
,
tname
,
name
)
!=
0
)
continue
;
}
else
{
...
...
fs/efivarfs/super.c
浏览文件 @
6fa67e70
...
...
@@ -45,8 +45,7 @@ static struct super_block *efivarfs_sb;
* So we need to perform a case-sensitive match on part 1 and a
* case-insensitive match on part 2.
*/
static
int
efivarfs_d_compare
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
efivarfs_d_compare
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
...
...
fs/fat/namei_msdos.c
浏览文件 @
6fa67e70
...
...
@@ -162,7 +162,7 @@ static int msdos_hash(const struct dentry *dentry, struct qstr *qstr)
* Compare two msdos names. If either of the names are invalid,
* we fall back to doing the standard name comparison.
*/
static
int
msdos_cmp
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
msdos_cmp
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
struct
fat_mount_options
*
options
=
&
MSDOS_SB
(
dentry
->
d_sb
)
->
options
;
...
...
fs/fat/namei_vfat.c
浏览文件 @
6fa67e70
...
...
@@ -138,7 +138,7 @@ static int vfat_hashi(const struct dentry *dentry, struct qstr *qstr)
/*
* Case insensitive compare of two vfat names.
*/
static
int
vfat_cmpi
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
vfat_cmpi
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
struct
nls_table
*
t
=
MSDOS_SB
(
dentry
->
d_sb
)
->
nls_io
;
...
...
@@ -157,7 +157,7 @@ static int vfat_cmpi(const struct dentry *parent, const struct dentry *dentry,
/*
* Case sensitive compare of two vfat names.
*/
static
int
vfat_cmp
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
vfat_cmp
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
unsigned
int
alen
,
blen
;
...
...
fs/hfs/hfs_fs.h
浏览文件 @
6fa67e70
...
...
@@ -233,7 +233,7 @@ extern const struct dentry_operations hfs_dentry_operations;
extern
int
hfs_hash_dentry
(
const
struct
dentry
*
,
struct
qstr
*
);
extern
int
hfs_strcmp
(
const
unsigned
char
*
,
unsigned
int
,
const
unsigned
char
*
,
unsigned
int
);
extern
int
hfs_compare_dentry
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
extern
int
hfs_compare_dentry
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
);
/* trans.c */
...
...
fs/hfs/string.c
浏览文件 @
6fa67e70
...
...
@@ -92,7 +92,7 @@ int hfs_strcmp(const unsigned char *s1, unsigned int len1,
* Test for equality of two strings in the HFS filename character ordering.
* return 1 on failure and 0 on success
*/
int
hfs_compare_dentry
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
int
hfs_compare_dentry
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
const
unsigned
char
*
n1
,
*
n2
;
...
...
fs/hfsplus/hfsplus_fs.h
浏览文件 @
6fa67e70
...
...
@@ -520,8 +520,7 @@ int hfsplus_uni2asc(struct super_block *sb, const struct hfsplus_unistr *ustr,
int
hfsplus_asc2uni
(
struct
super_block
*
sb
,
struct
hfsplus_unistr
*
ustr
,
int
max_unistr_len
,
const
char
*
astr
,
int
len
);
int
hfsplus_hash_dentry
(
const
struct
dentry
*
dentry
,
struct
qstr
*
str
);
int
hfsplus_compare_dentry
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
unsigned
int
len
,
int
hfsplus_compare_dentry
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
);
/* wrapper.c */
...
...
fs/hfsplus/unicode.c
浏览文件 @
6fa67e70
...
...
@@ -385,7 +385,7 @@ int hfsplus_hash_dentry(const struct dentry *dentry, struct qstr *str)
* Composed unicode characters are decomposed and case-folding is performed
* if the appropriate bits are (un)set on the superblock.
*/
int
hfsplus_compare_dentry
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
int
hfsplus_compare_dentry
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
struct
super_block
*
sb
=
dentry
->
d_sb
;
...
...
fs/hpfs/dentry.c
浏览文件 @
6fa67e70
...
...
@@ -34,7 +34,7 @@ static int hpfs_hash_dentry(const struct dentry *dentry, struct qstr *qstr)
return
0
;
}
static
int
hpfs_compare_dentry
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
hpfs_compare_dentry
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
unsigned
al
=
len
;
...
...
fs/isofs/inode.c
浏览文件 @
6fa67e70
...
...
@@ -29,18 +29,15 @@
#define BEQUIET
static
int
isofs_hashi
(
const
struct
dentry
*
parent
,
struct
qstr
*
qstr
);
static
int
isofs_dentry_cmpi
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
isofs_dentry_cmpi
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
);
#ifdef CONFIG_JOLIET
static
int
isofs_hashi_ms
(
const
struct
dentry
*
parent
,
struct
qstr
*
qstr
);
static
int
isofs_hash_ms
(
const
struct
dentry
*
parent
,
struct
qstr
*
qstr
);
static
int
isofs_dentry_cmpi_ms
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
isofs_dentry_cmpi_ms
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
);
static
int
isofs_dentry_cmp_ms
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
isofs_dentry_cmp_ms
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
);
#endif
...
...
@@ -235,7 +232,7 @@ isofs_hashi(const struct dentry *dentry, struct qstr *qstr)
}
static
int
isofs_dentry_cmpi
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
isofs_dentry_cmpi
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
return
isofs_dentry_cmp_common
(
len
,
str
,
name
,
0
,
1
);
...
...
@@ -276,14 +273,14 @@ isofs_hashi_ms(const struct dentry *dentry, struct qstr *qstr)
}
static
int
isofs_dentry_cmp_ms
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
isofs_dentry_cmp_ms
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
return
isofs_dentry_cmp_common
(
len
,
str
,
name
,
1
,
0
);
}
static
int
isofs_dentry_cmpi_ms
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
isofs_dentry_cmpi_ms
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
return
isofs_dentry_cmp_common
(
len
,
str
,
name
,
1
,
1
);
...
...
fs/isofs/namei.c
浏览文件 @
6fa67e70
...
...
@@ -22,7 +22,7 @@ isofs_cmp(struct dentry *dentry, const char *compare, int dlen)
qstr
.
len
=
dlen
;
if
(
likely
(
!
dentry
->
d_op
))
return
dentry
->
d_name
.
len
!=
dlen
||
memcmp
(
dentry
->
d_name
.
name
,
compare
,
dlen
);
return
dentry
->
d_op
->
d_compare
(
NULL
,
NULL
,
dentry
->
d_name
.
len
,
dentry
->
d_name
.
name
,
&
qstr
);
return
dentry
->
d_op
->
d_compare
(
NULL
,
dentry
->
d_name
.
len
,
dentry
->
d_name
.
name
,
&
qstr
);
}
/*
...
...
fs/jfs/namei.c
浏览文件 @
6fa67e70
...
...
@@ -1572,7 +1572,7 @@ static int jfs_ci_hash(const struct dentry *dir, struct qstr *this)
return
0
;
}
static
int
jfs_ci_compare
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
jfs_ci_compare
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
int
i
,
result
=
1
;
...
...
fs/ncpfs/dir.c
浏览文件 @
6fa67e70
...
...
@@ -74,7 +74,7 @@ const struct inode_operations ncp_dir_inode_operations =
*/
static
int
ncp_lookup_validate
(
struct
dentry
*
,
unsigned
int
);
static
int
ncp_hash_dentry
(
const
struct
dentry
*
,
struct
qstr
*
);
static
int
ncp_compare_dentry
(
const
struct
dentry
*
,
const
struct
dentry
*
,
static
int
ncp_compare_dentry
(
const
struct
dentry
*
,
unsigned
int
,
const
char
*
,
const
struct
qstr
*
);
static
int
ncp_delete_dentry
(
const
struct
dentry
*
);
static
void
ncp_d_prune
(
struct
dentry
*
dentry
);
...
...
@@ -154,7 +154,7 @@ ncp_hash_dentry(const struct dentry *dentry, struct qstr *this)
* the callers will handle races.
*/
static
int
ncp_compare_dentry
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
ncp_compare_dentry
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
struct
inode
*
pinode
;
...
...
@@ -162,7 +162,7 @@ ncp_compare_dentry(const struct dentry *parent, const struct dentry *dentry,
if
(
len
!=
name
->
len
)
return
1
;
pinode
=
d_inode_rcu
(
parent
);
pinode
=
d_inode_rcu
(
dentry
->
d_
parent
);
if
(
!
pinode
)
return
1
;
...
...
fs/proc/proc_sysctl.c
浏览文件 @
6fa67e70
...
...
@@ -834,7 +834,7 @@ static int sysctl_is_seen(struct ctl_table_header *p)
return
res
;
}
static
int
proc_sys_compare
(
const
struct
dentry
*
parent
,
const
struct
dentry
*
dentry
,
static
int
proc_sys_compare
(
const
struct
dentry
*
dentry
,
unsigned
int
len
,
const
char
*
str
,
const
struct
qstr
*
name
)
{
struct
ctl_table_header
*
head
;
...
...
include/linux/dcache.h
浏览文件 @
6fa67e70
...
...
@@ -130,7 +130,7 @@ struct dentry_operations {
int
(
*
d_revalidate
)(
struct
dentry
*
,
unsigned
int
);
int
(
*
d_weak_revalidate
)(
struct
dentry
*
,
unsigned
int
);
int
(
*
d_hash
)(
const
struct
dentry
*
,
struct
qstr
*
);
int
(
*
d_compare
)(
const
struct
dentry
*
,
const
struct
dentry
*
,
int
(
*
d_compare
)(
const
struct
dentry
*
,
unsigned
int
,
const
char
*
,
const
struct
qstr
*
);
int
(
*
d_delete
)(
const
struct
dentry
*
);
int
(
*
d_init
)(
struct
dentry
*
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录