Loading fs/ext3/balloc.c +4 −4 Original line number Diff line number Diff line Loading @@ -676,7 +676,7 @@ void ext3_free_blocks(handle_t *handle, struct inode *inode, } ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks); if (dquot_freed_blocks) DQUOT_FREE_BLOCK(inode, dquot_freed_blocks); vfs_dq_free_block(inode, dquot_freed_blocks); return; } Loading Loading @@ -1502,7 +1502,7 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode, /* * Check quota for allocation of this block. */ if (DQUOT_ALLOC_BLOCK(inode, num)) { if (vfs_dq_alloc_block(inode, num)) { *errp = -EDQUOT; return 0; } Loading Loading @@ -1714,7 +1714,7 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode, *errp = 0; brelse(bitmap_bh); DQUOT_FREE_BLOCK(inode, *count-num); vfs_dq_free_block(inode, *count-num); *count = num; return ret_block; Loading @@ -1729,7 +1729,7 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode, * Undo the block allocation */ if (!performed_allocation) DQUOT_FREE_BLOCK(inode, *count); vfs_dq_free_block(inode, *count); brelse(bitmap_bh); return 0; } Loading fs/ext3/ialloc.c +6 −6 Original line number Diff line number Diff line Loading @@ -123,10 +123,10 @@ void ext3_free_inode (handle_t *handle, struct inode * inode) * Note: we must free any quota before locking the superblock, * as writing the quota to disk may need the lock as well. */ DQUOT_INIT(inode); vfs_dq_init(inode); ext3_xattr_delete_inode(handle, inode); DQUOT_FREE_INODE(inode); DQUOT_DROP(inode); vfs_dq_free_inode(inode); vfs_dq_drop(inode); is_directory = S_ISDIR(inode->i_mode); Loading Loading @@ -589,7 +589,7 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode) sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0; ret = inode; if(DQUOT_ALLOC_INODE(inode)) { if (vfs_dq_alloc_inode(inode)) { err = -EDQUOT; goto fail_drop; } Loading Loading @@ -620,10 +620,10 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode) return ret; fail_free_drop: DQUOT_FREE_INODE(inode); vfs_dq_free_inode(inode); fail_drop: DQUOT_DROP(inode); vfs_dq_drop(inode); inode->i_flags |= S_NOQUOTA; inode->i_nlink = 0; unlock_new_inode(inode); Loading fs/ext3/inode.c +3 −3 Original line number Diff line number Diff line Loading @@ -3055,7 +3055,7 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr) error = PTR_ERR(handle); goto err_out; } error = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0; error = vfs_dq_transfer(inode, attr) ? -EDQUOT : 0; if (error) { ext3_journal_stop(handle); return error; Loading Loading @@ -3146,7 +3146,7 @@ static int ext3_writepage_trans_blocks(struct inode *inode) ret = 2 * (bpp + indirects) + 2; #ifdef CONFIG_QUOTA /* We know that structure was already allocated during DQUOT_INIT so /* We know that structure was already allocated during vfs_dq_init so * we will be updating only the data blocks + inodes */ ret += 2*EXT3_QUOTA_TRANS_BLOCKS(inode->i_sb); #endif Loading Loading @@ -3237,7 +3237,7 @@ int ext3_mark_inode_dirty(handle_t *handle, struct inode *inode) * i_size has been changed by generic_commit_write() and we thus need * to include the updated inode in the current transaction. * * Also, DQUOT_ALLOC_SPACE() will always dirty the inode when blocks * Also, vfs_dq_alloc_space() will always dirty the inode when blocks * are allocated to the file. * * If the inode is marked synchronous, we don't honour that here - doing Loading fs/ext3/namei.c +3 −3 Original line number Diff line number Diff line Loading @@ -2049,7 +2049,7 @@ static int ext3_rmdir (struct inode * dir, struct dentry *dentry) /* Initialize quotas before so that eventual writes go in * separate transaction */ DQUOT_INIT(dentry->d_inode); vfs_dq_init(dentry->d_inode); handle = ext3_journal_start(dir, EXT3_DELETE_TRANS_BLOCKS(dir->i_sb)); if (IS_ERR(handle)) return PTR_ERR(handle); Loading Loading @@ -2108,7 +2108,7 @@ static int ext3_unlink(struct inode * dir, struct dentry *dentry) /* Initialize quotas before so that eventual writes go * in separate transaction */ DQUOT_INIT(dentry->d_inode); vfs_dq_init(dentry->d_inode); handle = ext3_journal_start(dir, EXT3_DELETE_TRANS_BLOCKS(dir->i_sb)); if (IS_ERR(handle)) return PTR_ERR(handle); Loading Loading @@ -2272,7 +2272,7 @@ static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry, /* Initialize quotas before so that eventual writes go * in separate transaction */ if (new_dentry->d_inode) DQUOT_INIT(new_dentry->d_inode); vfs_dq_init(new_dentry->d_inode); handle = ext3_journal_start(old_dir, 2 * EXT3_DATA_TRANS_BLOCKS(old_dir->i_sb) + EXT3_INDEX_EXTRA_TRANS_BLOCKS + 2); Loading fs/ext3/super.c +2 −2 Original line number Diff line number Diff line Loading @@ -1436,7 +1436,7 @@ static void ext3_orphan_cleanup (struct super_block * sb, } list_add(&EXT3_I(inode)->i_orphan, &EXT3_SB(sb)->s_orphan); DQUOT_INIT(inode); vfs_dq_init(inode); if (inode->i_nlink) { printk(KERN_DEBUG "%s: truncating inode %lu to %Ld bytes\n", Loading Loading @@ -2700,7 +2700,7 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf) * Process 1 Process 2 * ext3_create() quota_sync() * journal_start() write_dquot() * DQUOT_INIT() down(dqio_mutex) * vfs_dq_init() down(dqio_mutex) * down(dqio_mutex) journal_start() * */ Loading Loading
fs/ext3/balloc.c +4 −4 Original line number Diff line number Diff line Loading @@ -676,7 +676,7 @@ void ext3_free_blocks(handle_t *handle, struct inode *inode, } ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks); if (dquot_freed_blocks) DQUOT_FREE_BLOCK(inode, dquot_freed_blocks); vfs_dq_free_block(inode, dquot_freed_blocks); return; } Loading Loading @@ -1502,7 +1502,7 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode, /* * Check quota for allocation of this block. */ if (DQUOT_ALLOC_BLOCK(inode, num)) { if (vfs_dq_alloc_block(inode, num)) { *errp = -EDQUOT; return 0; } Loading Loading @@ -1714,7 +1714,7 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode, *errp = 0; brelse(bitmap_bh); DQUOT_FREE_BLOCK(inode, *count-num); vfs_dq_free_block(inode, *count-num); *count = num; return ret_block; Loading @@ -1729,7 +1729,7 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode, * Undo the block allocation */ if (!performed_allocation) DQUOT_FREE_BLOCK(inode, *count); vfs_dq_free_block(inode, *count); brelse(bitmap_bh); return 0; } Loading
fs/ext3/ialloc.c +6 −6 Original line number Diff line number Diff line Loading @@ -123,10 +123,10 @@ void ext3_free_inode (handle_t *handle, struct inode * inode) * Note: we must free any quota before locking the superblock, * as writing the quota to disk may need the lock as well. */ DQUOT_INIT(inode); vfs_dq_init(inode); ext3_xattr_delete_inode(handle, inode); DQUOT_FREE_INODE(inode); DQUOT_DROP(inode); vfs_dq_free_inode(inode); vfs_dq_drop(inode); is_directory = S_ISDIR(inode->i_mode); Loading Loading @@ -589,7 +589,7 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode) sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0; ret = inode; if(DQUOT_ALLOC_INODE(inode)) { if (vfs_dq_alloc_inode(inode)) { err = -EDQUOT; goto fail_drop; } Loading Loading @@ -620,10 +620,10 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode) return ret; fail_free_drop: DQUOT_FREE_INODE(inode); vfs_dq_free_inode(inode); fail_drop: DQUOT_DROP(inode); vfs_dq_drop(inode); inode->i_flags |= S_NOQUOTA; inode->i_nlink = 0; unlock_new_inode(inode); Loading
fs/ext3/inode.c +3 −3 Original line number Diff line number Diff line Loading @@ -3055,7 +3055,7 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr) error = PTR_ERR(handle); goto err_out; } error = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0; error = vfs_dq_transfer(inode, attr) ? -EDQUOT : 0; if (error) { ext3_journal_stop(handle); return error; Loading Loading @@ -3146,7 +3146,7 @@ static int ext3_writepage_trans_blocks(struct inode *inode) ret = 2 * (bpp + indirects) + 2; #ifdef CONFIG_QUOTA /* We know that structure was already allocated during DQUOT_INIT so /* We know that structure was already allocated during vfs_dq_init so * we will be updating only the data blocks + inodes */ ret += 2*EXT3_QUOTA_TRANS_BLOCKS(inode->i_sb); #endif Loading Loading @@ -3237,7 +3237,7 @@ int ext3_mark_inode_dirty(handle_t *handle, struct inode *inode) * i_size has been changed by generic_commit_write() and we thus need * to include the updated inode in the current transaction. * * Also, DQUOT_ALLOC_SPACE() will always dirty the inode when blocks * Also, vfs_dq_alloc_space() will always dirty the inode when blocks * are allocated to the file. * * If the inode is marked synchronous, we don't honour that here - doing Loading
fs/ext3/namei.c +3 −3 Original line number Diff line number Diff line Loading @@ -2049,7 +2049,7 @@ static int ext3_rmdir (struct inode * dir, struct dentry *dentry) /* Initialize quotas before so that eventual writes go in * separate transaction */ DQUOT_INIT(dentry->d_inode); vfs_dq_init(dentry->d_inode); handle = ext3_journal_start(dir, EXT3_DELETE_TRANS_BLOCKS(dir->i_sb)); if (IS_ERR(handle)) return PTR_ERR(handle); Loading Loading @@ -2108,7 +2108,7 @@ static int ext3_unlink(struct inode * dir, struct dentry *dentry) /* Initialize quotas before so that eventual writes go * in separate transaction */ DQUOT_INIT(dentry->d_inode); vfs_dq_init(dentry->d_inode); handle = ext3_journal_start(dir, EXT3_DELETE_TRANS_BLOCKS(dir->i_sb)); if (IS_ERR(handle)) return PTR_ERR(handle); Loading Loading @@ -2272,7 +2272,7 @@ static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry, /* Initialize quotas before so that eventual writes go * in separate transaction */ if (new_dentry->d_inode) DQUOT_INIT(new_dentry->d_inode); vfs_dq_init(new_dentry->d_inode); handle = ext3_journal_start(old_dir, 2 * EXT3_DATA_TRANS_BLOCKS(old_dir->i_sb) + EXT3_INDEX_EXTRA_TRANS_BLOCKS + 2); Loading
fs/ext3/super.c +2 −2 Original line number Diff line number Diff line Loading @@ -1436,7 +1436,7 @@ static void ext3_orphan_cleanup (struct super_block * sb, } list_add(&EXT3_I(inode)->i_orphan, &EXT3_SB(sb)->s_orphan); DQUOT_INIT(inode); vfs_dq_init(inode); if (inode->i_nlink) { printk(KERN_DEBUG "%s: truncating inode %lu to %Ld bytes\n", Loading Loading @@ -2700,7 +2700,7 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf) * Process 1 Process 2 * ext3_create() quota_sync() * journal_start() write_dquot() * DQUOT_INIT() down(dqio_mutex) * vfs_dq_init() down(dqio_mutex) * down(dqio_mutex) journal_start() * */ Loading