From 5f9861a66ce697389ea89236902ef6ef5f54225b Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Thu, 18 Mar 2004 05:38:53 -0800 Subject: [PATCH] add file_accessed() helper New inlined helper - file_accessed(file) (wrapper for update_atime()) --- include/linux/fs.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/fs.h b/include/linux/fs.h index 9468e5d98ead..c069102db207 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -914,6 +914,11 @@ static inline void mark_inode_dirty_sync(struct inode *inode) __mark_inode_dirty(inode, I_DIRTY_SYNC); } +static inline void file_accessed(struct file *file) +{ + update_atime(file->f_dentry->d_inode); +} + /** * &export_operations - for nfsd to communicate with file systems @@ -1321,7 +1326,8 @@ extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t l ssize_t generic_file_write_nolock(struct file *file, const struct iovec *iov, unsigned long nr_segs, loff_t *ppos); extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void __user *); -extern void do_generic_mapping_read(struct address_space *, struct file_ra_state *, struct file *, +extern void do_generic_mapping_read(struct address_space *mapping, + struct file_ra_state *, struct file *, loff_t *, read_descriptor_t *, read_actor_t); extern void file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); -- cgit v1.2.3