Skip to content

Commit a269eb1

Browse files
committed
ext4: Use lowercase names of quota functions
Use lowercase names of quota functions instead of old uppercase ones. Signed-off-by: Jan Kara <jack@suse.cz> Acked-by: Mingming Cao <cmm@us.ibm.com> CC: linux-ext4@vger.kernel.org
1 parent 81a0522 commit a269eb1

7 files changed

Lines changed: 20 additions & 20 deletions

File tree

‎fs/ext4/balloc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,
536536
ext4_mb_free_blocks(handle, inode, block, count,
537537
metadata, &dquot_freed_blocks);
538538
if (dquot_freed_blocks)
539-
DQUOT_FREE_BLOCK(inode, dquot_freed_blocks);
539+
vfs_dq_free_block(inode, dquot_freed_blocks);
540540
return;
541541
}
542542

‎fs/ext4/ialloc.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
220220
* Note: we must free any quota before locking the superblock,
221221
* as writing the quota to disk may need the lock as well.
222222
*/
223-
DQUOT_INIT(inode);
223+
vfs_dq_init(inode);
224224
ext4_xattr_delete_inode(handle, inode);
225-
DQUOT_FREE_INODE(inode);
226-
DQUOT_DROP(inode);
225+
vfs_dq_free_inode(inode);
226+
vfs_dq_drop(inode);
227227

228228
is_directory = S_ISDIR(inode->i_mode);
229229

@@ -915,7 +915,7 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode)
915915
ei->i_extra_isize = EXT4_SB(sb)->s_want_extra_isize;
916916

917917
ret = inode;
918-
if (DQUOT_ALLOC_INODE(inode)) {
918+
if (vfs_dq_alloc_inode(inode)) {
919919
err = -EDQUOT;
920920
goto fail_drop;
921921
}
@@ -956,10 +956,10 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode)
956956
return ret;
957957

958958
fail_free_drop:
959-
DQUOT_FREE_INODE(inode);
959+
vfs_dq_free_inode(inode);
960960

961961
fail_drop:
962-
DQUOT_DROP(inode);
962+
vfs_dq_drop(inode);
963963
inode->i_flags |= S_NOQUOTA;
964964
inode->i_nlink = 0;
965965
unlock_new_inode(inode);

‎fs/ext4/inode.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4642,7 +4642,7 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
46424642
error = PTR_ERR(handle);
46434643
goto err_out;
46444644
}
4645-
error = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0;
4645+
error = vfs_dq_transfer(inode, attr) ? -EDQUOT : 0;
46464646
if (error) {
46474647
ext4_journal_stop(handle);
46484648
return error;
@@ -5021,7 +5021,7 @@ int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode)
50215021
* i_size has been changed by generic_commit_write() and we thus need
50225022
* to include the updated inode in the current transaction.
50235023
*
5024-
* Also, DQUOT_ALLOC_SPACE() will always dirty the inode when blocks
5024+
* Also, vfs_dq_alloc_block() will always dirty the inode when blocks
50255025
* are allocated to the file.
50265026
*
50275027
* If the inode is marked synchronous, we don't honour that here - doing

‎fs/ext4/mballoc.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4587,7 +4587,7 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle,
45874587
return 0;
45884588
}
45894589
reserv_blks = ar->len;
4590-
while (ar->len && DQUOT_ALLOC_BLOCK(ar->inode, ar->len)) {
4590+
while (ar->len && vfs_dq_alloc_block(ar->inode, ar->len)) {
45914591
ar->flags |= EXT4_MB_HINT_NOPREALLOC;
45924592
ar->len--;
45934593
}
@@ -4663,7 +4663,7 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle,
46634663
kmem_cache_free(ext4_ac_cachep, ac);
46644664
out1:
46654665
if (inquota && ar->len < inquota)
4666-
DQUOT_FREE_BLOCK(ar->inode, inquota - ar->len);
4666+
vfs_dq_free_block(ar->inode, inquota - ar->len);
46674667
out3:
46684668
if (!ar->len) {
46694669
if (!EXT4_I(ar->inode)->i_delalloc_reserved_flag)

‎fs/ext4/namei.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,7 +2092,7 @@ static int ext4_rmdir(struct inode *dir, struct dentry *dentry)
20922092

20932093
/* Initialize quotas before so that eventual writes go in
20942094
* separate transaction */
2095-
DQUOT_INIT(dentry->d_inode);
2095+
vfs_dq_init(dentry->d_inode);
20962096
handle = ext4_journal_start(dir, EXT4_DELETE_TRANS_BLOCKS(dir->i_sb));
20972097
if (IS_ERR(handle))
20982098
return PTR_ERR(handle);
@@ -2151,7 +2151,7 @@ static int ext4_unlink(struct inode *dir, struct dentry *dentry)
21512151

21522152
/* Initialize quotas before so that eventual writes go
21532153
* in separate transaction */
2154-
DQUOT_INIT(dentry->d_inode);
2154+
vfs_dq_init(dentry->d_inode);
21552155
handle = ext4_journal_start(dir, EXT4_DELETE_TRANS_BLOCKS(dir->i_sb));
21562156
if (IS_ERR(handle))
21572157
return PTR_ERR(handle);
@@ -2318,7 +2318,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
23182318
/* Initialize quotas before so that eventual writes go
23192319
* in separate transaction */
23202320
if (new_dentry->d_inode)
2321-
DQUOT_INIT(new_dentry->d_inode);
2321+
vfs_dq_init(new_dentry->d_inode);
23222322
handle = ext4_journal_start(old_dir, 2 *
23232323
EXT4_DATA_TRANS_BLOCKS(old_dir->i_sb) +
23242324
EXT4_INDEX_EXTRA_TRANS_BLOCKS + 2);

‎fs/ext4/super.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,7 @@ static void ext4_orphan_cleanup(struct super_block *sb,
18041804
}
18051805

18061806
list_add(&EXT4_I(inode)->i_orphan, &EXT4_SB(sb)->s_orphan);
1807-
DQUOT_INIT(inode);
1807+
vfs_dq_init(inode);
18081808
if (inode->i_nlink) {
18091809
printk(KERN_DEBUG
18101810
"%s: truncating inode %lu to %lld bytes\n",
@@ -3369,8 +3369,8 @@ static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf)
33693369
* is locked for write. Otherwise the are possible deadlocks:
33703370
* Process 1 Process 2
33713371
* ext4_create() quota_sync()
3372-
* jbd2_journal_start() write_dquot()
3373-
* DQUOT_INIT() down(dqio_mutex)
3372+
* jbd2_journal_start() write_dquot()
3373+
* vfs_dq_init() down(dqio_mutex)
33743374
* down(dqio_mutex) jbd2_journal_start()
33753375
*
33763376
*/

‎fs/ext4/xattr.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ ext4_xattr_release_block(handle_t *handle, struct inode *inode,
490490
error = ext4_handle_dirty_metadata(handle, inode, bh);
491491
if (IS_SYNC(inode))
492492
ext4_handle_sync(handle);
493-
DQUOT_FREE_BLOCK(inode, 1);
493+
vfs_dq_free_block(inode, 1);
494494
ea_bdebug(bh, "refcount now=%d; releasing",
495495
le32_to_cpu(BHDR(bh)->h_refcount));
496496
if (ce)
@@ -784,7 +784,7 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
784784
/* The old block is released after updating
785785
the inode. */
786786
error = -EDQUOT;
787-
if (DQUOT_ALLOC_BLOCK(inode, 1))
787+
if (vfs_dq_alloc_block(inode, 1))
788788
goto cleanup;
789789
error = ext4_journal_get_write_access(handle,
790790
new_bh);
@@ -860,7 +860,7 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
860860
return error;
861861

862862
cleanup_dquot:
863-
DQUOT_FREE_BLOCK(inode, 1);
863+
vfs_dq_free_block(inode, 1);
864864
goto cleanup;
865865

866866
bad_block:

0 commit comments

Comments
 (0)