diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2009-12-14 13:21:14 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-12-23 13:33:55 +0100 |
commit | a9e7f4472075fb6937c545af3f6329e9946bbe66 (patch) | |
tree | 399e294982e1c9691332eca72942910a7f74e9f8 /fs/ext4/super.c | |
parent | quota: decouple fs reserved space from quota reservation (diff) | |
download | linux-a9e7f4472075fb6937c545af3f6329e9946bbe66.tar.xz linux-a9e7f4472075fb6937c545af3f6329e9946bbe66.zip |
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 '')
-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) ei->i_allocated_meta_blocks = 0; ei->i_delalloc_reserved_flag = 0; spin_lock_init(&(ei->i_block_reservation_lock)); +#ifdef CONFIG_QUOTA + ei->i_reserved_quota = 0; +#endif INIT_LIST_HEAD(&ei->i_aio_dio_complete_list); ei->cur_aio_dio = NULL; ei->i_sync_tid = 0; @@ -1014,7 +1017,9 @@ static const struct dquot_operations ext4_quota_operations = { .reserve_space = dquot_reserve_space, .claim_space = dquot_claim_space, .release_rsv = dquot_release_reserved_space, +#ifdef CONFIG_QUOTA .get_reserved_space = ext4_get_reserved_space, +#endif .alloc_inode = dquot_alloc_inode, .free_space = dquot_free_space, .free_inode = dquot_free_inode, |