aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-11-07 03:59:46 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:53:41 -0500
commitdb73e9aa99bf093427b79877f9475392724fd5e5 (patch)
tree6ea2631bd3772661c0a04f20fd9b03b047277121
parenta463ddd343dacf5f1badae514ed2c5135ec0c3a9 (diff)
[PATCH] remove superflous ctime/mtime updates in affs
Both AFFS and HPFS update the ctime and mtime in the write path, after generic_file_write returned and marked the inode dirty. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/affs/file.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/affs/file.c b/fs/affs/file.c
index 6744924b690..f72fb776ecd 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -22,14 +22,13 @@ static int affs_grow_extcache(struct inode *inode, u32 lc_idx);
22static struct buffer_head *affs_alloc_extblock(struct inode *inode, struct buffer_head *bh, u32 ext); 22static struct buffer_head *affs_alloc_extblock(struct inode *inode, struct buffer_head *bh, u32 ext);
23static inline struct buffer_head *affs_get_extblock(struct inode *inode, u32 ext); 23static inline struct buffer_head *affs_get_extblock(struct inode *inode, u32 ext);
24static struct buffer_head *affs_get_extblock_slow(struct inode *inode, u32 ext); 24static struct buffer_head *affs_get_extblock_slow(struct inode *inode, u32 ext);
25static ssize_t affs_file_write(struct file *filp, const char __user *buf, size_t count, loff_t *ppos);
26static int affs_file_open(struct inode *inode, struct file *filp); 25static int affs_file_open(struct inode *inode, struct file *filp);
27static int affs_file_release(struct inode *inode, struct file *filp); 26static int affs_file_release(struct inode *inode, struct file *filp);
28 27
29struct file_operations affs_file_operations = { 28struct file_operations affs_file_operations = {
30 .llseek = generic_file_llseek, 29 .llseek = generic_file_llseek,
31 .read = generic_file_read, 30 .read = generic_file_read,
32 .write = affs_file_write, 31 .write = generic_file_write,
33 .mmap = generic_file_mmap, 32 .mmap = generic_file_mmap,
34 .open = affs_file_open, 33 .open = affs_file_open,
35 .release = affs_file_release, 34 .release = affs_file_release,
@@ -473,21 +472,6 @@ affs_getemptyblk_ino(struct inode *inode, int block)
473 return ERR_PTR(err); 472 return ERR_PTR(err);
474} 473}
475 474
476static ssize_t
477affs_file_write(struct file *file, const char __user *buf,
478 size_t count, loff_t *ppos)
479{
480 ssize_t retval;
481
482 retval = generic_file_write (file, buf, count, ppos);
483 if (retval >0) {
484 struct inode *inode = file->f_dentry->d_inode;
485 inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
486 mark_inode_dirty(inode);
487 }
488 return retval;
489}
490
491static int 475static int
492affs_do_readpage_ofs(struct file *file, struct page *page, unsigned from, unsigned to) 476affs_do_readpage_ofs(struct file *file, struct page *page, unsigned from, unsigned to)
493{ 477{