diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2009-12-14 07:21:14 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-12-23 07:33:55 -0500 |
commit | a9e7f4472075fb6937c545af3f6329e9946bbe66 (patch) | |
tree | 399e294982e1c9691332eca72942910a7f74e9f8 /fs/ext4/super.c | |
parent | fd8fbfc1709822bd94247c5b2ab15a5f5041e103 (diff) |
ext4: Convert to generic reserved quota's space management.
This patch also fixes write vs chown race condition.
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 827bde1f2594..6ed9aa91f27d 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -704,6 +704,9 @@ static struct inode *ext4_alloc_inode(struct super_block *sb) | |||
704 | ei->i_allocated_meta_blocks = 0; | 704 | ei->i_allocated_meta_blocks = 0; |
705 | ei->i_delalloc_reserved_flag = 0; | 705 | ei->i_delalloc_reserved_flag = 0; |
706 | spin_lock_init(&(ei->i_block_reservation_lock)); | 706 | spin_lock_init(&(ei->i_block_reservation_lock)); |
707 | #ifdef CONFIG_QUOTA | ||
708 | ei->i_reserved_quota = 0; | ||
709 | #endif | ||
707 | INIT_LIST_HEAD(&ei->i_aio_dio_complete_list); | 710 | INIT_LIST_HEAD(&ei->i_aio_dio_complete_list); |
708 | ei->cur_aio_dio = NULL; | 711 | ei->cur_aio_dio = NULL; |
709 | ei->i_sync_tid = 0; | 712 | ei->i_sync_tid = 0; |
@@ -1014,7 +1017,9 @@ static const struct dquot_operations ext4_quota_operations = { | |||
1014 | .reserve_space = dquot_reserve_space, | 1017 | .reserve_space = dquot_reserve_space, |
1015 | .claim_space = dquot_claim_space, | 1018 | .claim_space = dquot_claim_space, |
1016 | .release_rsv = dquot_release_reserved_space, | 1019 | .release_rsv = dquot_release_reserved_space, |
1020 | #ifdef CONFIG_QUOTA | ||
1017 | .get_reserved_space = ext4_get_reserved_space, | 1021 | .get_reserved_space = ext4_get_reserved_space, |
1022 | #endif | ||
1018 | .alloc_inode = dquot_alloc_inode, | 1023 | .alloc_inode = dquot_alloc_inode, |
1019 | .free_space = dquot_free_space, | 1024 | .free_space = dquot_free_space, |
1020 | .free_inode = dquot_free_inode, | 1025 | .free_inode = dquot_free_inode, |