Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
84d08fa8
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
84d08fa8
编写于
7月 05, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
helper for reading ->d_count
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
74b9272b
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
22 addition
and
17 deletion
+22
-17
drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h
...ing/lustre/lustre/include/linux/lustre_patchless_compat.h
+1
-1
fs/autofs4/expire.c
fs/autofs4/expire.c
+4
-4
fs/autofs4/root.c
fs/autofs4/root.c
+1
-1
fs/ceph/inode.c
fs/ceph/inode.c
+2
-2
fs/ceph/mds_client.c
fs/ceph/mds_client.c
+1
-1
fs/coda/dir.c
fs/coda/dir.c
+1
-1
fs/ecryptfs/inode.c
fs/ecryptfs/inode.c
+1
-1
fs/locks.c
fs/locks.c
+1
-1
fs/nfs/dir.c
fs/nfs/dir.c
+3
-3
fs/nfs/unlink.c
fs/nfs/unlink.c
+1
-1
fs/nilfs2/super.c
fs/nilfs2/super.c
+1
-1
include/linux/dcache.h
include/linux/dcache.h
+5
-0
未找到文件。
drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h
浏览文件 @
84d08fa8
...
...
@@ -60,7 +60,7 @@ truncate_complete_page(struct address_space *mapping, struct page *page)
ll_delete_from_page_cache
(
page
);
}
# define d_refcount(d)
((d)->d_count
)
# define d_refcount(d)
d_count(d
)
#ifdef ATTR_OPEN
# define ATTR_FROM_OPEN ATTR_OPEN
...
...
fs/autofs4/expire.c
浏览文件 @
84d08fa8
...
...
@@ -109,7 +109,7 @@ static struct dentry *get_next_positive_subdir(struct dentry *prev,
spin_lock_nested
(
&
q
->
d_lock
,
DENTRY_D_LOCK_NESTED
);
/* Already gone or negative dentry (under construction) - try next */
if
(
q
->
d_count
==
0
||
!
simple_positive
(
q
))
{
if
(
!
d_count
(
q
)
||
!
simple_positive
(
q
))
{
spin_unlock
(
&
q
->
d_lock
);
next
=
q
->
d_u
.
d_child
.
next
;
goto
cont
;
...
...
@@ -267,7 +267,7 @@ static int autofs4_tree_busy(struct vfsmount *mnt,
else
ino_count
++
;
if
(
p
->
d_count
>
ino_count
)
{
if
(
d_count
(
p
)
>
ino_count
)
{
top_ino
->
last_used
=
jiffies
;
dput
(
p
);
return
1
;
...
...
@@ -409,7 +409,7 @@ struct dentry *autofs4_expire_indirect(struct super_block *sb,
if
(
!
exp_leaves
)
{
/* Path walk currently on this dentry? */
ino_count
=
atomic_read
(
&
ino
->
count
)
+
1
;
if
(
d
entry
->
d_count
>
ino_count
)
if
(
d
_count
(
dentry
)
>
ino_count
)
goto
next
;
if
(
!
autofs4_tree_busy
(
mnt
,
dentry
,
timeout
,
do_now
))
{
...
...
@@ -423,7 +423,7 @@ struct dentry *autofs4_expire_indirect(struct super_block *sb,
}
else
{
/* Path walk currently on this dentry? */
ino_count
=
atomic_read
(
&
ino
->
count
)
+
1
;
if
(
d
entry
->
d_count
>
ino_count
)
if
(
d
_count
(
dentry
)
>
ino_count
)
goto
next
;
expired
=
autofs4_check_leaves
(
mnt
,
dentry
,
timeout
,
do_now
);
...
...
fs/autofs4/root.c
浏览文件 @
84d08fa8
...
...
@@ -179,7 +179,7 @@ static struct dentry *autofs4_lookup_active(struct dentry *dentry)
spin_lock
(
&
active
->
d_lock
);
/* Already gone? */
if
(
active
->
d_count
==
0
)
if
(
!
d_count
(
active
)
)
goto
next
;
qstr
=
&
active
->
d_name
;
...
...
fs/ceph/inode.c
浏览文件 @
84d08fa8
...
...
@@ -903,8 +903,8 @@ static struct dentry *splice_dentry(struct dentry *dn, struct inode *in,
}
else
if
(
realdn
)
{
dout
(
"dn %p (%d) spliced with %p (%d) "
"inode %p ino %llx.%llx
\n
"
,
dn
,
d
n
->
d_count
,
realdn
,
realdn
->
d_count
,
dn
,
d
_count
(
dn
)
,
realdn
,
d_count
(
realdn
)
,
realdn
->
d_inode
,
ceph_vinop
(
realdn
->
d_inode
));
dput
(
dn
);
dn
=
realdn
;
...
...
fs/ceph/mds_client.c
浏览文件 @
84d08fa8
...
...
@@ -1553,7 +1553,7 @@ char *ceph_mdsc_build_path(struct dentry *dentry, int *plen, u64 *base,
*
base
=
ceph_ino
(
temp
->
d_inode
);
*
plen
=
len
;
dout
(
"build_path on %p %d built %llx '%.*s'
\n
"
,
dentry
,
d
entry
->
d_count
,
*
base
,
len
,
path
);
dentry
,
d
_count
(
dentry
)
,
*
base
,
len
,
path
);
return
path
;
}
...
...
fs/coda/dir.c
浏览文件 @
84d08fa8
...
...
@@ -526,7 +526,7 @@ static int coda_dentry_revalidate(struct dentry *de, unsigned int flags)
if
(
cii
->
c_flags
&
C_FLUSH
)
coda_flag_inode_children
(
inode
,
C_FLUSH
);
if
(
d
e
->
d_count
>
1
)
if
(
d
_count
(
de
)
>
1
)
/* pretend it's valid, but don't change the flags */
goto
out
;
...
...
fs/ecryptfs/inode.c
浏览文件 @
84d08fa8
...
...
@@ -358,7 +358,7 @@ static int ecryptfs_lookup_interpose(struct dentry *dentry,
lower_mnt
=
mntget
(
ecryptfs_dentry_to_lower_mnt
(
dentry
->
d_parent
));
fsstack_copy_attr_atime
(
dir_inode
,
lower_dentry
->
d_parent
->
d_inode
);
BUG_ON
(
!
lower_dentry
->
d_count
);
BUG_ON
(
!
d_count
(
lower_dentry
)
);
ecryptfs_set_dentry_private
(
dentry
,
dentry_info
);
ecryptfs_set_dentry_lower
(
dentry
,
lower_dentry
);
...
...
fs/locks.c
浏览文件 @
84d08fa8
...
...
@@ -1454,7 +1454,7 @@ static int generic_add_lease(struct file *filp, long arg, struct file_lock **flp
if
((
arg
==
F_RDLCK
)
&&
(
atomic_read
(
&
inode
->
i_writecount
)
>
0
))
goto
out
;
if
((
arg
==
F_WRLCK
)
&&
((
d
entry
->
d_count
>
1
)
&&
((
d
_count
(
dentry
)
>
1
)
||
(
atomic_read
(
&
inode
->
i_count
)
>
1
)))
goto
out
;
...
...
fs/nfs/dir.c
浏览文件 @
84d08fa8
...
...
@@ -1721,7 +1721,7 @@ int nfs_unlink(struct inode *dir, struct dentry *dentry)
dir
->
i_ino
,
dentry
->
d_name
.
name
);
spin_lock
(
&
dentry
->
d_lock
);
if
(
d
entry
->
d_count
>
1
)
{
if
(
d
_count
(
dentry
)
>
1
)
{
spin_unlock
(
&
dentry
->
d_lock
);
/* Start asynchronous writeout of the inode */
write_inode_now
(
dentry
->
d_inode
,
0
);
...
...
@@ -1866,7 +1866,7 @@ int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
dfprintk
(
VFS
,
"NFS: rename(%s/%s -> %s/%s, ct=%d)
\n
"
,
old_dentry
->
d_parent
->
d_name
.
name
,
old_dentry
->
d_name
.
name
,
new_dentry
->
d_parent
->
d_name
.
name
,
new_dentry
->
d_name
.
name
,
new_dentry
->
d_count
);
d_count
(
new_dentry
)
);
/*
* For non-directories, check whether the target is busy and if so,
...
...
@@ -1884,7 +1884,7 @@ int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
rehash
=
new_dentry
;
}
if
(
new_dentry
->
d_count
>
2
)
{
if
(
d_count
(
new_dentry
)
>
2
)
{
int
err
;
/* copy the target dentry's name */
...
...
fs/nfs/unlink.c
浏览文件 @
84d08fa8
...
...
@@ -479,7 +479,7 @@ nfs_sillyrename(struct inode *dir, struct dentry *dentry)
dfprintk
(
VFS
,
"NFS: silly-rename(%s/%s, ct=%d)
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
,
d
entry
->
d_count
);
d
_count
(
dentry
)
);
nfs_inc_stats
(
dir
,
NFSIOS_SILLYRENAME
);
/*
...
...
fs/nilfs2/super.c
浏览文件 @
84d08fa8
...
...
@@ -996,7 +996,7 @@ static int nilfs_attach_snapshot(struct super_block *s, __u64 cno,
static
int
nilfs_tree_was_touched
(
struct
dentry
*
root_dentry
)
{
return
root_dentry
->
d_count
>
1
;
return
d_count
(
root_dentry
)
>
1
;
}
/**
...
...
include/linux/dcache.h
浏览文件 @
84d08fa8
...
...
@@ -324,6 +324,11 @@ static inline int __d_rcu_to_refcount(struct dentry *dentry, unsigned seq)
return
ret
;
}
static
inline
unsigned
d_count
(
struct
dentry
*
dentry
)
{
return
dentry
->
d_count
;
}
/* validate "insecure" dentry pointer */
extern
int
d_validate
(
struct
dentry
*
,
struct
dentry
*
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录