diff options
author | Tony Luck <tony.luck@intel.com> | 2005-11-07 12:05:22 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-11-07 12:05:22 -0500 |
commit | 0ad3a96f8ad910ecf87a25ec69ed360b284dee2e (patch) | |
tree | 12d292fd58fc0f7a3eb56c89dfc23569f3ab6c00 /fs/affs | |
parent | f79b348856fbaf77e4a0c5cb08a808e5879967a9 (diff) | |
parent | 5b2f7ffcb734d3046144dfbd5ac6d76254a9e522 (diff) |
Auto-update from upstream
Diffstat (limited to 'fs/affs')
-rw-r--r-- | fs/affs/file.c | 18 | ||||
-rw-r--r-- | fs/affs/super.c | 16 |
2 files changed, 7 insertions, 27 deletions
diff --git a/fs/affs/file.c b/fs/affs/file.c index 6744924b69..f72fb776ec 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); | |||
22 | static struct buffer_head *affs_alloc_extblock(struct inode *inode, struct buffer_head *bh, u32 ext); | 22 | static struct buffer_head *affs_alloc_extblock(struct inode *inode, struct buffer_head *bh, u32 ext); |
23 | static inline struct buffer_head *affs_get_extblock(struct inode *inode, u32 ext); | 23 | static inline struct buffer_head *affs_get_extblock(struct inode *inode, u32 ext); |
24 | static struct buffer_head *affs_get_extblock_slow(struct inode *inode, u32 ext); | 24 | static struct buffer_head *affs_get_extblock_slow(struct inode *inode, u32 ext); |
25 | static ssize_t affs_file_write(struct file *filp, const char __user *buf, size_t count, loff_t *ppos); | ||
26 | static int affs_file_open(struct inode *inode, struct file *filp); | 25 | static int affs_file_open(struct inode *inode, struct file *filp); |
27 | static int affs_file_release(struct inode *inode, struct file *filp); | 26 | static int affs_file_release(struct inode *inode, struct file *filp); |
28 | 27 | ||
29 | struct file_operations affs_file_operations = { | 28 | struct 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 | ||
476 | static ssize_t | ||
477 | affs_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 | |||
491 | static int | 475 | static int |
492 | affs_do_readpage_ofs(struct file *file, struct page *page, unsigned from, unsigned to) | 476 | affs_do_readpage_ofs(struct file *file, struct page *page, unsigned from, unsigned to) |
493 | { | 477 | { |
diff --git a/fs/affs/super.c b/fs/affs/super.c index 9c3080716c..aaec015a16 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
@@ -35,8 +35,7 @@ affs_put_super(struct super_block *sb) | |||
35 | mark_buffer_dirty(sbi->s_root_bh); | 35 | mark_buffer_dirty(sbi->s_root_bh); |
36 | } | 36 | } |
37 | 37 | ||
38 | if (sbi->s_prefix) | 38 | kfree(sbi->s_prefix); |
39 | kfree(sbi->s_prefix); | ||
40 | affs_free_bitmap(sb); | 39 | affs_free_bitmap(sb); |
41 | affs_brelse(sbi->s_root_bh); | 40 | affs_brelse(sbi->s_root_bh); |
42 | kfree(sbi); | 41 | kfree(sbi); |
@@ -198,10 +197,9 @@ parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s | |||
198 | *mount_opts |= SF_MUFS; | 197 | *mount_opts |= SF_MUFS; |
199 | break; | 198 | break; |
200 | case Opt_prefix: | 199 | case Opt_prefix: |
201 | if (*prefix) { /* Free any previous prefix */ | 200 | /* Free any previous prefix */ |
202 | kfree(*prefix); | 201 | kfree(*prefix); |
203 | *prefix = NULL; | 202 | *prefix = NULL; |
204 | } | ||
205 | *prefix = match_strdup(&args[0]); | 203 | *prefix = match_strdup(&args[0]); |
206 | if (!*prefix) | 204 | if (!*prefix) |
207 | return 0; | 205 | return 0; |
@@ -462,11 +460,9 @@ got_root: | |||
462 | out_error: | 460 | out_error: |
463 | if (root_inode) | 461 | if (root_inode) |
464 | iput(root_inode); | 462 | iput(root_inode); |
465 | if (sbi->s_bitmap) | 463 | kfree(sbi->s_bitmap); |
466 | kfree(sbi->s_bitmap); | ||
467 | affs_brelse(root_bh); | 464 | affs_brelse(root_bh); |
468 | if (sbi->s_prefix) | 465 | kfree(sbi->s_prefix); |
469 | kfree(sbi->s_prefix); | ||
470 | kfree(sbi); | 466 | kfree(sbi); |
471 | sb->s_fs_info = NULL; | 467 | sb->s_fs_info = NULL; |
472 | return -EINVAL; | 468 | return -EINVAL; |