diff options
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r-- | fs/reiserfs/super.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index b4a7dd03bdb9..59125fb36d42 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
16 | #include <linux/time.h> | 17 | #include <linux/time.h> |
17 | #include <asm/uaccess.h> | 18 | #include <asm/uaccess.h> |
@@ -246,7 +247,7 @@ static int finish_unfinished(struct super_block *s) | |||
246 | retval = remove_save_link_only(s, &save_link_key, 0); | 247 | retval = remove_save_link_only(s, &save_link_key, 0); |
247 | continue; | 248 | continue; |
248 | } | 249 | } |
249 | vfs_dq_init(inode); | 250 | dquot_initialize(inode); |
250 | 251 | ||
251 | if (truncate && S_ISDIR(inode->i_mode)) { | 252 | if (truncate && S_ISDIR(inode->i_mode)) { |
252 | /* We got a truncate request for a dir which is impossible. | 253 | /* We got a truncate request for a dir which is impossible. |
@@ -578,6 +579,11 @@ out: | |||
578 | reiserfs_write_unlock_once(inode->i_sb, lock_depth); | 579 | reiserfs_write_unlock_once(inode->i_sb, lock_depth); |
579 | } | 580 | } |
580 | 581 | ||
582 | static void reiserfs_clear_inode(struct inode *inode) | ||
583 | { | ||
584 | dquot_drop(inode); | ||
585 | } | ||
586 | |||
581 | #ifdef CONFIG_QUOTA | 587 | #ifdef CONFIG_QUOTA |
582 | static ssize_t reiserfs_quota_write(struct super_block *, int, const char *, | 588 | static ssize_t reiserfs_quota_write(struct super_block *, int, const char *, |
583 | size_t, loff_t); | 589 | size_t, loff_t); |
@@ -590,6 +596,7 @@ static const struct super_operations reiserfs_sops = { | |||
590 | .destroy_inode = reiserfs_destroy_inode, | 596 | .destroy_inode = reiserfs_destroy_inode, |
591 | .write_inode = reiserfs_write_inode, | 597 | .write_inode = reiserfs_write_inode, |
592 | .dirty_inode = reiserfs_dirty_inode, | 598 | .dirty_inode = reiserfs_dirty_inode, |
599 | .clear_inode = reiserfs_clear_inode, | ||
593 | .delete_inode = reiserfs_delete_inode, | 600 | .delete_inode = reiserfs_delete_inode, |
594 | .put_super = reiserfs_put_super, | 601 | .put_super = reiserfs_put_super, |
595 | .write_super = reiserfs_write_super, | 602 | .write_super = reiserfs_write_super, |
@@ -616,13 +623,6 @@ static int reiserfs_write_info(struct super_block *, int); | |||
616 | static int reiserfs_quota_on(struct super_block *, int, int, char *, int); | 623 | static int reiserfs_quota_on(struct super_block *, int, int, char *, int); |
617 | 624 | ||
618 | static const struct dquot_operations reiserfs_quota_operations = { | 625 | static const struct dquot_operations reiserfs_quota_operations = { |
619 | .initialize = dquot_initialize, | ||
620 | .drop = dquot_drop, | ||
621 | .alloc_space = dquot_alloc_space, | ||
622 | .alloc_inode = dquot_alloc_inode, | ||
623 | .free_space = dquot_free_space, | ||
624 | .free_inode = dquot_free_inode, | ||
625 | .transfer = dquot_transfer, | ||
626 | .write_dquot = reiserfs_write_dquot, | 626 | .write_dquot = reiserfs_write_dquot, |
627 | .acquire_dquot = reiserfs_acquire_dquot, | 627 | .acquire_dquot = reiserfs_acquire_dquot, |
628 | .release_dquot = reiserfs_release_dquot, | 628 | .release_dquot = reiserfs_release_dquot, |
@@ -1619,10 +1619,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1619 | save_mount_options(s, data); | 1619 | save_mount_options(s, data); |
1620 | 1620 | ||
1621 | sbi = kzalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL); | 1621 | sbi = kzalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL); |
1622 | if (!sbi) { | 1622 | if (!sbi) |
1623 | errval = -ENOMEM; | 1623 | return -ENOMEM; |
1624 | goto error_alloc; | ||
1625 | } | ||
1626 | s->s_fs_info = sbi; | 1624 | s->s_fs_info = sbi; |
1627 | /* Set default values for options: non-aggressive tails, RO on errors */ | 1625 | /* Set default values for options: non-aggressive tails, RO on errors */ |
1628 | REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_SMALLTAIL); | 1626 | REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_SMALLTAIL); |
@@ -1879,12 +1877,12 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1879 | return (0); | 1877 | return (0); |
1880 | 1878 | ||
1881 | error: | 1879 | error: |
1882 | reiserfs_write_unlock(s); | ||
1883 | error_alloc: | ||
1884 | if (jinit_done) { /* kill the commit thread, free journal ram */ | 1880 | if (jinit_done) { /* kill the commit thread, free journal ram */ |
1885 | journal_release_error(NULL, s); | 1881 | journal_release_error(NULL, s); |
1886 | } | 1882 | } |
1887 | 1883 | ||
1884 | reiserfs_write_unlock(s); | ||
1885 | |||
1888 | reiserfs_free_bitmap_cache(s); | 1886 | reiserfs_free_bitmap_cache(s); |
1889 | if (SB_BUFFER_WITH_SB(s)) | 1887 | if (SB_BUFFER_WITH_SB(s)) |
1890 | brelse(SB_BUFFER_WITH_SB(s)); | 1888 | brelse(SB_BUFFER_WITH_SB(s)); |