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>
This commit is contained in:
committed by
Jan Kara
parent
fd8fbfc170
commit
a9e7f44720
@ -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,
|
||||
|
Reference in New Issue
Block a user