Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
68ac1234
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看板
提交
68ac1234
编写于
3月 15, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch touch_atime to struct path
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
40ffe67d
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
21 addition
and
19 deletion
+21
-19
fs/cachefiles/namei.c
fs/cachefiles/namei.c
+2
-1
fs/ecryptfs/file.c
fs/ecryptfs/file.c
+4
-5
fs/inode.c
fs/inode.c
+3
-2
fs/namei.c
fs/namei.c
+1
-1
fs/nfsd/vfs.c
fs/nfsd/vfs.c
+6
-5
fs/stat.c
fs/stat.c
+1
-1
include/linux/fs.h
include/linux/fs.h
+2
-2
net/unix/af_unix.c
net/unix/af_unix.c
+2
-2
未找到文件。
fs/cachefiles/namei.c
浏览文件 @
68ac1234
...
...
@@ -646,7 +646,8 @@ int cachefiles_walk_to_object(struct cachefiles_object *parent,
* (this is used to keep track of culling, and atimes are only
* updated by read, write and readdir but not lookup or
* open) */
touch_atime
(
cache
->
mnt
,
next
);
path
.
dentry
=
next
;
touch_atime
(
&
path
);
}
/* open a file interface onto a data file */
...
...
fs/ecryptfs/file.c
浏览文件 @
68ac1234
...
...
@@ -48,8 +48,7 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb,
unsigned
long
nr_segs
,
loff_t
pos
)
{
ssize_t
rc
;
struct
dentry
*
lower_dentry
;
struct
vfsmount
*
lower_vfsmount
;
struct
path
lower
;
struct
file
*
file
=
iocb
->
ki_filp
;
rc
=
generic_file_aio_read
(
iocb
,
iov
,
nr_segs
,
pos
);
...
...
@@ -60,9 +59,9 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb,
if
(
-
EIOCBQUEUED
==
rc
)
rc
=
wait_on_sync_kiocb
(
iocb
);
if
(
rc
>=
0
)
{
lower
_
dentry
=
ecryptfs_dentry_to_lower
(
file
->
f_path
.
dentry
);
lower
_vfsmou
nt
=
ecryptfs_dentry_to_lower_mnt
(
file
->
f_path
.
dentry
);
touch_atime
(
lower_vfsmount
,
lower_dentry
);
lower
.
dentry
=
ecryptfs_dentry_to_lower
(
file
->
f_path
.
dentry
);
lower
.
m
nt
=
ecryptfs_dentry_to_lower_mnt
(
file
->
f_path
.
dentry
);
touch_atime
(
&
lower
);
}
return
rc
;
}
...
...
fs/inode.c
浏览文件 @
68ac1234
...
...
@@ -1499,9 +1499,10 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
* This function automatically handles read only file systems and media,
* as well as the "noatime" flag and inode specific "noatime" markers.
*/
void
touch_atime
(
struct
vfsmount
*
mnt
,
struct
dentry
*
dentry
)
void
touch_atime
(
struct
path
*
path
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
vfsmount
*
mnt
=
path
->
mnt
;
struct
inode
*
inode
=
path
->
dentry
->
d_inode
;
struct
timespec
now
;
if
(
inode
->
i_flags
&
S_NOATIME
)
...
...
fs/namei.c
浏览文件 @
68ac1234
...
...
@@ -642,7 +642,7 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
cond_resched
();
current
->
total_link_count
++
;
touch_atime
(
link
->
mnt
,
dentry
);
touch_atime
(
link
);
nd_set_link
(
nd
,
NULL
);
error
=
security_inode_follow_link
(
link
->
dentry
,
nd
);
...
...
fs/nfsd/vfs.c
浏览文件 @
68ac1234
...
...
@@ -1541,30 +1541,31 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
__be32
nfsd_readlink
(
struct
svc_rqst
*
rqstp
,
struct
svc_fh
*
fhp
,
char
*
buf
,
int
*
lenp
)
{
struct
dentry
*
dentry
;
struct
inode
*
inode
;
mm_segment_t
oldfs
;
__be32
err
;
int
host_err
;
struct
path
path
;
err
=
fh_verify
(
rqstp
,
fhp
,
S_IFLNK
,
NFSD_MAY_NOP
);
if
(
err
)
goto
out
;
dentry
=
fhp
->
fh_dentry
;
inode
=
dentry
->
d_inode
;
path
.
mnt
=
fhp
->
fh_export
->
ex_path
.
mnt
;
path
.
dentry
=
fhp
->
fh_dentry
;
inode
=
path
.
dentry
->
d_inode
;
err
=
nfserr_inval
;
if
(
!
inode
->
i_op
->
readlink
)
goto
out
;
touch_atime
(
fhp
->
fh_export
->
ex_path
.
mnt
,
dentry
);
touch_atime
(
&
path
);
/* N.B. Why does this call need a get_fs()??
* Remove the set_fs and watch the fireworks:-) --okir
*/
oldfs
=
get_fs
();
set_fs
(
KERNEL_DS
);
host_err
=
inode
->
i_op
->
readlink
(
dentry
,
buf
,
*
lenp
);
host_err
=
inode
->
i_op
->
readlink
(
path
.
dentry
,
buf
,
*
lenp
);
set_fs
(
oldfs
);
if
(
host_err
<
0
)
...
...
fs/stat.c
浏览文件 @
68ac1234
...
...
@@ -307,7 +307,7 @@ SYSCALL_DEFINE4(readlinkat, int, dfd, const char __user *, pathname,
if
(
inode
->
i_op
->
readlink
)
{
error
=
security_inode_readlink
(
path
.
dentry
);
if
(
!
error
)
{
touch_atime
(
path
.
mnt
,
path
.
dentry
);
touch_atime
(
&
path
);
error
=
inode
->
i_op
->
readlink
(
path
.
dentry
,
buf
,
bufsiz
);
}
...
...
include/linux/fs.h
浏览文件 @
68ac1234
...
...
@@ -1812,11 +1812,11 @@ static inline void inode_inc_iversion(struct inode *inode)
spin_unlock
(
&
inode
->
i_lock
);
}
extern
void
touch_atime
(
struct
vfsmount
*
mnt
,
struct
dentry
*
dentry
);
extern
void
touch_atime
(
struct
path
*
);
static
inline
void
file_accessed
(
struct
file
*
file
)
{
if
(
!
(
file
->
f_flags
&
O_NOATIME
))
touch_atime
(
file
->
f_path
.
mnt
,
file
->
f_path
.
dentry
);
touch_atime
(
&
file
->
f_path
);
}
int
sync_inode
(
struct
inode
*
inode
,
struct
writeback_control
*
wbc
);
...
...
net/unix/af_unix.c
浏览文件 @
68ac1234
...
...
@@ -771,7 +771,7 @@ static struct sock *unix_find_other(struct net *net,
goto
put_fail
;
if
(
u
->
sk_type
==
type
)
touch_atime
(
path
.
mnt
,
path
.
dentry
);
touch_atime
(
&
path
);
path_put
(
&
path
);
...
...
@@ -787,7 +787,7 @@ static struct sock *unix_find_other(struct net *net,
struct
dentry
*
dentry
;
dentry
=
unix_sk
(
u
)
->
path
.
dentry
;
if
(
dentry
)
touch_atime
(
unix_sk
(
u
)
->
path
.
mnt
,
dentry
);
touch_atime
(
&
unix_sk
(
u
)
->
path
);
}
else
goto
fail
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录