Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
b583043e
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b583043e
编写于
10月 31, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
kill f_dentry uses
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
30e46aba
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
31 addition
and
37 deletion
+31
-37
drivers/block/drbd/drbd_debugfs.c
drivers/block/drbd/drbd_debugfs.c
+3
-3
drivers/scsi/lpfc/lpfc_debugfs.c
drivers/scsi/lpfc/lpfc_debugfs.c
+2
-2
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/llite/file.c
+3
-9
fs/ceph/dir.c
fs/ceph/dir.c
+3
-3
fs/ceph/file.c
fs/ceph/file.c
+1
-1
fs/cifs/readdir.c
fs/cifs/readdir.c
+1
-1
fs/ecryptfs/crypto.c
fs/ecryptfs/crypto.c
+1
-1
fs/ecryptfs/mmap.c
fs/ecryptfs/mmap.c
+1
-1
fs/efivarfs/file.c
fs/efivarfs/file.c
+2
-2
fs/sync.c
fs/sync.c
+1
-1
include/linux/cgroup.h
include/linux/cgroup.h
+2
-2
kernel/auditsc.c
kernel/auditsc.c
+1
-1
kernel/events/core.c
kernel/events/core.c
+1
-1
kernel/taskstats.c
kernel/taskstats.c
+1
-1
mm/memcontrol.c
mm/memcontrol.c
+2
-2
security/commoncap.c
security/commoncap.c
+1
-1
security/integrity/ima/ima_api.c
security/integrity/ima/ima_api.c
+2
-2
security/integrity/ima/ima_appraise.c
security/integrity/ima/ima_appraise.c
+2
-2
security/integrity/ima/ima_template_lib.c
security/integrity/ima/ima_template_lib.c
+1
-1
未找到文件。
drivers/block/drbd/drbd_debugfs.c
浏览文件 @
b583043e
...
...
@@ -419,7 +419,7 @@ static int in_flight_summary_show(struct seq_file *m, void *pos)
return
0
;
}
/* simple_positive(file->f_dentry) respectively debugfs_positive(),
/* simple_positive(file->f_
path.
dentry) respectively debugfs_positive(),
* but neither is "reachable" from here.
* So we have our own inline version of it above. :-( */
static
inline
int
debugfs_positive
(
struct
dentry
*
dentry
)
...
...
@@ -437,14 +437,14 @@ static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, vo
/* Are we still linked,
* or has debugfs_remove() already been called? */
parent
=
file
->
f_dentry
->
d_parent
;
parent
=
file
->
f_
path
.
dentry
->
d_parent
;
/* not sure if this can happen: */
if
(
!
parent
||
!
parent
->
d_inode
)
goto
out
;
/* serialize with d_delete() */
mutex_lock
(
&
parent
->
d_inode
->
i_mutex
);
/* Make sure the object is still alive */
if
(
debugfs_positive
(
file
->
f_dentry
)
if
(
debugfs_positive
(
file
->
f_
path
.
dentry
)
&&
kref_get_unless_zero
(
kref
))
ret
=
0
;
mutex_unlock
(
&
parent
->
d_inode
->
i_mutex
);
...
...
drivers/scsi/lpfc/lpfc_debugfs.c
浏览文件 @
b583043e
...
...
@@ -1011,7 +1011,7 @@ static ssize_t
lpfc_debugfs_dif_err_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
nbytes
,
loff_t
*
ppos
)
{
struct
dentry
*
dent
=
file
->
f_dentry
;
struct
dentry
*
dent
=
file
->
f_
path
.
dentry
;
struct
lpfc_hba
*
phba
=
file
->
private_data
;
char
cbuf
[
32
];
uint64_t
tmp
=
0
;
...
...
@@ -1052,7 +1052,7 @@ static ssize_t
lpfc_debugfs_dif_err_write
(
struct
file
*
file
,
const
char
__user
*
buf
,
size_t
nbytes
,
loff_t
*
ppos
)
{
struct
dentry
*
dent
=
file
->
f_dentry
;
struct
dentry
*
dent
=
file
->
f_
path
.
dentry
;
struct
lpfc_hba
*
phba
=
file
->
private_data
;
char
dstbuf
[
32
];
uint64_t
tmp
=
0
;
...
...
drivers/staging/lustre/lustre/llite/file.c
浏览文件 @
b583043e
...
...
@@ -2092,7 +2092,7 @@ static int ll_swap_layouts(struct file *file1, struct file *file2,
rc
=
0
;
if
(
llss
->
ia2
.
ia_valid
!=
0
)
{
mutex_lock
(
&
llss
->
inode1
->
i_mutex
);
rc
=
ll_setattr
(
file1
->
f_dentry
,
&
llss
->
ia2
);
rc
=
ll_setattr
(
file1
->
f_
path
.
dentry
,
&
llss
->
ia2
);
mutex_unlock
(
&
llss
->
inode1
->
i_mutex
);
}
...
...
@@ -2100,7 +2100,7 @@ static int ll_swap_layouts(struct file *file1, struct file *file2,
int
rc1
;
mutex_lock
(
&
llss
->
inode2
->
i_mutex
);
rc1
=
ll_setattr
(
file2
->
f_dentry
,
&
llss
->
ia1
);
rc1
=
ll_setattr
(
file2
->
f_
path
.
dentry
,
&
llss
->
ia1
);
mutex_unlock
(
&
llss
->
inode2
->
i_mutex
);
if
(
rc
==
0
)
rc
=
rc1
;
...
...
@@ -2185,7 +2185,7 @@ static int ll_hsm_import(struct inode *inode, struct file *file,
mutex_lock
(
&
inode
->
i_mutex
);
rc
=
ll_setattr_raw
(
file
->
f_dentry
,
attr
,
true
);
rc
=
ll_setattr_raw
(
file
->
f_
path
.
dentry
,
attr
,
true
);
if
(
rc
==
-
ENODATA
)
rc
=
0
;
...
...
@@ -2622,12 +2622,6 @@ int cl_sync_file_range(struct inode *inode, loff_t start, loff_t end,
return
result
;
}
/*
* When dentry is provided (the 'else' case), *file->f_dentry may be
* null and dentry must be used directly rather than pulled from
* *file->f_dentry as is done otherwise.
*/
int
ll_fsync
(
struct
file
*
file
,
loff_t
start
,
loff_t
end
,
int
datasync
)
{
struct
dentry
*
dentry
=
file
->
f_dentry
;
...
...
fs/ceph/dir.c
浏览文件 @
b583043e
...
...
@@ -123,7 +123,7 @@ static int __dcache_readdir(struct file *file, struct dir_context *ctx,
u32
shared_gen
)
{
struct
ceph_file_info
*
fi
=
file
->
private_data
;
struct
dentry
*
parent
=
file
->
f_dentry
;
struct
dentry
*
parent
=
file
->
f_
path
.
dentry
;
struct
inode
*
dir
=
parent
->
d_inode
;
struct
list_head
*
p
;
struct
dentry
*
dentry
,
*
last
;
...
...
@@ -274,7 +274,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx)
off
=
1
;
}
if
(
ctx
->
pos
==
1
)
{
ino_t
ino
=
parent_ino
(
file
->
f_dentry
);
ino_t
ino
=
parent_ino
(
file
->
f_
path
.
dentry
);
dout
(
"readdir off 1 -> '..'
\n
"
);
if
(
!
dir_emit
(
ctx
,
".."
,
2
,
ceph_translate_ino
(
inode
->
i_sb
,
ino
),
...
...
@@ -337,7 +337,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx)
}
req
->
r_inode
=
inode
;
ihold
(
inode
);
req
->
r_dentry
=
dget
(
file
->
f_dentry
);
req
->
r_dentry
=
dget
(
file
->
f_
path
.
dentry
);
/* hints to request -> mds selection code */
req
->
r_direct_mode
=
USE_AUTH_MDS
;
req
->
r_direct_hash
=
ceph_frag_value
(
frag
);
...
...
fs/ceph/file.c
浏览文件 @
b583043e
...
...
@@ -211,7 +211,7 @@ int ceph_open(struct inode *inode, struct file *file)
req
->
r_num_caps
=
1
;
if
(
flags
&
O_CREAT
)
parent_inode
=
ceph_get_dentry_parent_inode
(
file
->
f_dentry
);
parent_inode
=
ceph_get_dentry_parent_inode
(
file
->
f_
path
.
dentry
);
err
=
ceph_mdsc_do_request
(
mdsc
,
parent_inode
,
req
);
iput
(
parent_inode
);
if
(
!
err
)
...
...
fs/cifs/readdir.c
浏览文件 @
b583043e
...
...
@@ -753,7 +753,7 @@ static int cifs_filldir(char *find_entry, struct file *file,
*/
fattr
.
cf_flags
|=
CIFS_FATTR_NEED_REVAL
;
cifs_prime_dcache
(
file
->
f_dentry
,
&
name
,
&
fattr
);
cifs_prime_dcache
(
file
->
f_
path
.
dentry
,
&
name
,
&
fattr
);
ino
=
cifs_uniqueid_to_ino_t
(
fattr
.
cf_uniqueid
);
return
!
dir_emit
(
ctx
,
name
.
name
,
name
.
len
,
ino
,
fattr
.
cf_dtype
);
...
...
fs/ecryptfs/crypto.c
浏览文件 @
b583043e
...
...
@@ -1373,7 +1373,7 @@ static int ecryptfs_read_headers_virt(char *page_virt,
int
ecryptfs_read_xattr_region
(
char
*
page_virt
,
struct
inode
*
ecryptfs_inode
)
{
struct
dentry
*
lower_dentry
=
ecryptfs_inode_to_private
(
ecryptfs_inode
)
->
lower_file
->
f_dentry
;
ecryptfs_inode_to_private
(
ecryptfs_inode
)
->
lower_file
->
f_
path
.
dentry
;
ssize_t
size
;
int
rc
=
0
;
...
...
fs/ecryptfs/mmap.c
浏览文件 @
b583043e
...
...
@@ -419,7 +419,7 @@ static int ecryptfs_write_inode_size_to_xattr(struct inode *ecryptfs_inode)
ssize_t
size
;
void
*
xattr_virt
;
struct
dentry
*
lower_dentry
=
ecryptfs_inode_to_private
(
ecryptfs_inode
)
->
lower_file
->
f_dentry
;
ecryptfs_inode_to_private
(
ecryptfs_inode
)
->
lower_file
->
f_
path
.
dentry
;
struct
inode
*
lower_inode
=
lower_dentry
->
d_inode
;
int
rc
;
...
...
fs/efivarfs/file.c
浏览文件 @
b583043e
...
...
@@ -47,8 +47,8 @@ static ssize_t efivarfs_file_write(struct file *file,
if
(
bytes
==
-
ENOENT
)
{
drop_nlink
(
inode
);
d_delete
(
file
->
f_dentry
);
dput
(
file
->
f_dentry
);
d_delete
(
file
->
f_
path
.
dentry
);
dput
(
file
->
f_
path
.
dentry
);
}
else
{
mutex_lock
(
&
inode
->
i_mutex
);
i_size_write
(
inode
,
datasize
+
sizeof
(
attributes
));
...
...
fs/sync.c
浏览文件 @
b583043e
...
...
@@ -154,7 +154,7 @@ SYSCALL_DEFINE1(syncfs, int, fd)
if
(
!
f
.
file
)
return
-
EBADF
;
sb
=
f
.
file
->
f_dentry
->
d_sb
;
sb
=
f
.
file
->
f_
path
.
dentry
->
d_sb
;
down_read
(
&
sb
->
s_umount
);
ret
=
sync_filesystem
(
sb
);
...
...
include/linux/cgroup.h
浏览文件 @
b583043e
...
...
@@ -367,8 +367,8 @@ struct css_set {
* struct cftype: handler definitions for cgroup control files
*
* When reading/writing to a file:
* - the cgroup to use is file->f_dentry->d_parent->d_fsdata
* - the 'cftype' of the file is file->f_dentry->d_fsdata
* - the cgroup to use is file->f_
path.
dentry->d_parent->d_fsdata
* - the 'cftype' of the file is file->f_
path.
dentry->d_fsdata
*/
/* cftype->flags */
...
...
kernel/auditsc.c
浏览文件 @
b583043e
...
...
@@ -2373,7 +2373,7 @@ int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
ax
->
d
.
next
=
context
->
aux
;
context
->
aux
=
(
void
*
)
ax
;
dentry
=
dget
(
bprm
->
file
->
f_dentry
);
dentry
=
dget
(
bprm
->
file
->
f_
path
.
dentry
);
get_vfs_caps_from_disk
(
dentry
,
&
vcaps
);
dput
(
dentry
);
...
...
kernel/events/core.c
浏览文件 @
b583043e
...
...
@@ -614,7 +614,7 @@ static inline int perf_cgroup_connect(int fd, struct perf_event *event,
if
(
!
f
.
file
)
return
-
EBADF
;
css
=
css_tryget_online_from_dir
(
f
.
file
->
f_dentry
,
css
=
css_tryget_online_from_dir
(
f
.
file
->
f_
path
.
dentry
,
&
perf_event_cgrp_subsys
);
if
(
IS_ERR
(
css
))
{
ret
=
PTR_ERR
(
css
);
...
...
kernel/taskstats.c
浏览文件 @
b583043e
...
...
@@ -459,7 +459,7 @@ static int cgroupstats_user_cmd(struct sk_buff *skb, struct genl_info *info)
stats
=
nla_data
(
na
);
memset
(
stats
,
0
,
sizeof
(
*
stats
));
rc
=
cgroupstats_build
(
stats
,
f
.
file
->
f_dentry
);
rc
=
cgroupstats_build
(
stats
,
f
.
file
->
f_
path
.
dentry
);
if
(
rc
<
0
)
{
nlmsg_free
(
rep_skb
);
goto
err
;
...
...
mm/memcontrol.c
浏览文件 @
b583043e
...
...
@@ -5055,7 +5055,7 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of,
*
* DO NOT ADD NEW FILES.
*/
name
=
cfile
.
file
->
f_dentry
->
d_name
.
name
;
name
=
cfile
.
file
->
f_
path
.
dentry
->
d_name
.
name
;
if
(
!
strcmp
(
name
,
"memory.usage_in_bytes"
))
{
event
->
register_event
=
mem_cgroup_usage_register_event
;
...
...
@@ -5079,7 +5079,7 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of,
* automatically removed on cgroup destruction but the removal is
* asynchronous, so take an extra ref on @css.
*/
cfile_css
=
css_tryget_online_from_dir
(
cfile
.
file
->
f_dentry
->
d_parent
,
cfile_css
=
css_tryget_online_from_dir
(
cfile
.
file
->
f_
path
.
dentry
->
d_parent
,
&
memory_cgrp_subsys
);
ret
=
-
EINVAL
;
if
(
IS_ERR
(
cfile_css
))
...
...
security/commoncap.c
浏览文件 @
b583043e
...
...
@@ -446,7 +446,7 @@ static int get_file_caps(struct linux_binprm *bprm, bool *effective, bool *has_c
if
(
bprm
->
file
->
f_path
.
mnt
->
mnt_flags
&
MNT_NOSUID
)
return
0
;
dentry
=
dget
(
bprm
->
file
->
f_dentry
);
dentry
=
dget
(
bprm
->
file
->
f_
path
.
dentry
);
rc
=
get_vfs_caps_from_disk
(
dentry
,
&
vcaps
);
if
(
rc
<
0
)
{
...
...
security/integrity/ima/ima_api.c
浏览文件 @
b583043e
...
...
@@ -196,7 +196,7 @@ int ima_collect_measurement(struct integrity_iint_cache *iint,
{
const
char
*
audit_cause
=
"failed"
;
struct
inode
*
inode
=
file_inode
(
file
);
const
char
*
filename
=
file
->
f_dentry
->
d_name
.
name
;
const
char
*
filename
=
file
->
f_
path
.
dentry
->
d_name
.
name
;
int
result
=
0
;
struct
{
struct
ima_digest_data
hdr
;
...
...
@@ -204,7 +204,7 @@ int ima_collect_measurement(struct integrity_iint_cache *iint,
}
hash
;
if
(
xattr_value
)
*
xattr_len
=
ima_read_xattr
(
file
->
f_dentry
,
xattr_value
);
*
xattr_len
=
ima_read_xattr
(
file
->
f_
path
.
dentry
,
xattr_value
);
if
(
!
(
iint
->
flags
&
IMA_COLLECTED
))
{
u64
i_version
=
file_inode
(
file
)
->
i_version
;
...
...
security/integrity/ima/ima_appraise.c
浏览文件 @
b583043e
...
...
@@ -189,7 +189,7 @@ int ima_appraise_measurement(int func, struct integrity_iint_cache *iint,
{
static
const
char
op
[]
=
"appraise_data"
;
char
*
cause
=
"unknown"
;
struct
dentry
*
dentry
=
file
->
f_dentry
;
struct
dentry
*
dentry
=
file
->
f_
path
.
dentry
;
struct
inode
*
inode
=
dentry
->
d_inode
;
enum
integrity_status
status
=
INTEGRITY_UNKNOWN
;
int
rc
=
xattr_len
,
hash_start
=
0
;
...
...
@@ -289,7 +289,7 @@ int ima_appraise_measurement(int func, struct integrity_iint_cache *iint,
*/
void
ima_update_xattr
(
struct
integrity_iint_cache
*
iint
,
struct
file
*
file
)
{
struct
dentry
*
dentry
=
file
->
f_dentry
;
struct
dentry
*
dentry
=
file
->
f_
path
.
dentry
;
int
rc
=
0
;
/* do not collect and update hash for digital signatures */
...
...
security/integrity/ima/ima_template_lib.c
浏览文件 @
b583043e
...
...
@@ -284,7 +284,7 @@ static int ima_eventname_init_common(struct integrity_iint_cache *iint,
}
if
(
file
)
{
cur_filename
=
file
->
f_dentry
->
d_name
.
name
;
cur_filename
=
file
->
f_
path
.
dentry
->
d_name
.
name
;
cur_filename_len
=
strlen
(
cur_filename
);
}
else
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录