summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2004-03-18 05:38:53 -0800
committerDavid S. Miller <davem@nuts.davemloft.net>2004-03-18 05:38:53 -0800
commit5f9861a66ce697389ea89236902ef6ef5f54225b (patch)
tree06e9241e8dfe5f77aa50ae7cb0685651bf3e3505 /include/linux
parentd2a4a177a25de3099c2a6bb0272211728261228d (diff)
[PATCH] add file_accessed() helper
New inlined helper - file_accessed(file) (wrapper for update_atime())
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h8
1 files changed, 7 insertions, 1 deletions
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);