提交 badcf2b7 编写于 作者: A Al Viro

constify touch_atime()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 8033426e
...@@ -1525,7 +1525,7 @@ static int update_time(struct inode *inode, struct timespec *time, int flags) ...@@ -1525,7 +1525,7 @@ static int update_time(struct inode *inode, struct timespec *time, int flags)
* This function automatically handles read only file systems and media, * This function automatically handles read only file systems and media,
* as well as the "noatime" flag and inode specific "noatime" markers. * as well as the "noatime" flag and inode specific "noatime" markers.
*/ */
void touch_atime(struct path *path) void touch_atime(const struct path *path)
{ {
struct vfsmount *mnt = path->mnt; struct vfsmount *mnt = path->mnt;
struct inode *inode = path->dentry->d_inode; struct inode *inode = path->dentry->d_inode;
......
...@@ -1804,7 +1804,7 @@ enum file_time_flags { ...@@ -1804,7 +1804,7 @@ enum file_time_flags {
S_VERSION = 8, S_VERSION = 8,
}; };
extern void touch_atime(struct path *); extern void touch_atime(const struct path *);
static inline void file_accessed(struct file *file) static inline void file_accessed(struct file *file)
{ {
if (!(file->f_flags & O_NOATIME)) if (!(file->f_flags & O_NOATIME))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册