diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-09-19 09:47:49 +0100 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-09-19 09:47:49 +0100 |
commit | 044a500e46742d39d22f1781cfb64ba93b463e39 (patch) | |
tree | b0313211ea7ba26b90c1083ade0e4c9f486b87db /fs/fat/inode.c | |
parent | f6098cf449b81c14a51e48dd22ae47d03126a1de (diff) | |
parent | 6c0741fbdee5bd0f8ed13ac287c4ab18e8ba7d83 (diff) |
Merge branch 'master' of /home/src/linux-2.6/
Diffstat (limited to 'fs/fat/inode.c')
-rw-r--r-- | fs/fat/inode.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index a7cbe68e225..51b1d15d9d5 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -102,6 +102,19 @@ static int fat_prepare_write(struct file *file, struct page *page, &MSDOS_I(page->mapping->host)->mmu_private); } +static int fat_commit_write(struct file *file, struct page *page, + unsigned from, unsigned to) +{ + struct inode *inode = page->mapping->host; + int err = generic_commit_write(file, page, from, to); + if (!err && !(MSDOS_I(inode)->i_attrs & ATTR_ARCH)) { + inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; + MSDOS_I(inode)->i_attrs |= ATTR_ARCH; + mark_inode_dirty(inode); + } + return err; +} + static sector_t _fat_bmap(struct address_space *mapping, sector_t block) { return generic_block_bmap(mapping, block, fat_get_block); @@ -112,7 +125,7 @@ static struct address_space_operations fat_aops = { .writepage = fat_writepage, .sync_page = block_sync_page, .prepare_write = fat_prepare_write, - .commit_write = generic_commit_write, + .commit_write = fat_commit_write, .bmap = _fat_bmap }; |