Commit 15ed2851 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by Theodore Ts'o

ext4: remove unused argument from ext4_(inc|dec)_count

The 'handle' argument is not used for anything so simply remove it.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarRitesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/20200826133116.11592-1-nborisov@suse.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 81e8c3c5
...@@ -2554,7 +2554,7 @@ static int ext4_delete_entry(handle_t *handle, ...@@ -2554,7 +2554,7 @@ static int ext4_delete_entry(handle_t *handle,
* for checking S_ISDIR(inode) (since the INODE_INDEX feature will not be set * for checking S_ISDIR(inode) (since the INODE_INDEX feature will not be set
* on regular files) and to avoid creating huge/slow non-HTREE directories. * on regular files) and to avoid creating huge/slow non-HTREE directories.
*/ */
static void ext4_inc_count(handle_t *handle, struct inode *inode) static void ext4_inc_count(struct inode *inode)
{ {
inc_nlink(inode); inc_nlink(inode);
if (is_dx(inode) && if (is_dx(inode) &&
...@@ -2566,7 +2566,7 @@ static void ext4_inc_count(handle_t *handle, struct inode *inode) ...@@ -2566,7 +2566,7 @@ static void ext4_inc_count(handle_t *handle, struct inode *inode)
* If a directory had nlink == 1, then we should let it be 1. This indicates * If a directory had nlink == 1, then we should let it be 1. This indicates
* directory has >EXT4_LINK_MAX subdirs. * directory has >EXT4_LINK_MAX subdirs.
*/ */
static void ext4_dec_count(handle_t *handle, struct inode *inode) static void ext4_dec_count(struct inode *inode)
{ {
if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2) if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2)
drop_nlink(inode); drop_nlink(inode);
...@@ -2825,7 +2825,7 @@ static int ext4_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) ...@@ -2825,7 +2825,7 @@ static int ext4_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
iput(inode); iput(inode);
goto out_retry; goto out_retry;
} }
ext4_inc_count(handle, dir); ext4_inc_count(dir);
ext4_update_dx_flag(dir); ext4_update_dx_flag(dir);
err = ext4_mark_inode_dirty(handle, dir); err = ext4_mark_inode_dirty(handle, dir);
if (err) if (err)
...@@ -3163,7 +3163,7 @@ static int ext4_rmdir(struct inode *dir, struct dentry *dentry) ...@@ -3163,7 +3163,7 @@ static int ext4_rmdir(struct inode *dir, struct dentry *dentry)
retval = ext4_mark_inode_dirty(handle, inode); retval = ext4_mark_inode_dirty(handle, inode);
if (retval) if (retval)
goto end_rmdir; goto end_rmdir;
ext4_dec_count(handle, dir); ext4_dec_count(dir);
ext4_update_dx_flag(dir); ext4_update_dx_flag(dir);
retval = ext4_mark_inode_dirty(handle, dir); retval = ext4_mark_inode_dirty(handle, dir);
...@@ -3434,7 +3434,7 @@ static int ext4_link(struct dentry *old_dentry, ...@@ -3434,7 +3434,7 @@ static int ext4_link(struct dentry *old_dentry,
ext4_handle_sync(handle); ext4_handle_sync(handle);
inode->i_ctime = current_time(inode); inode->i_ctime = current_time(inode);
ext4_inc_count(handle, inode); ext4_inc_count(inode);
ihold(inode); ihold(inode);
err = ext4_add_entry(handle, dentry, inode); err = ext4_add_entry(handle, dentry, inode);
...@@ -3631,9 +3631,9 @@ static void ext4_update_dir_count(handle_t *handle, struct ext4_renament *ent) ...@@ -3631,9 +3631,9 @@ static void ext4_update_dir_count(handle_t *handle, struct ext4_renament *ent)
{ {
if (ent->dir_nlink_delta) { if (ent->dir_nlink_delta) {
if (ent->dir_nlink_delta == -1) if (ent->dir_nlink_delta == -1)
ext4_dec_count(handle, ent->dir); ext4_dec_count(ent->dir);
else else
ext4_inc_count(handle, ent->dir); ext4_inc_count(ent->dir);
ext4_mark_inode_dirty(handle, ent->dir); ext4_mark_inode_dirty(handle, ent->dir);
} }
} }
...@@ -3845,7 +3845,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -3845,7 +3845,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
} }
if (new.inode) { if (new.inode) {
ext4_dec_count(handle, new.inode); ext4_dec_count(new.inode);
new.inode->i_ctime = current_time(new.inode); new.inode->i_ctime = current_time(new.inode);
} }
old.dir->i_ctime = old.dir->i_mtime = current_time(old.dir); old.dir->i_ctime = old.dir->i_mtime = current_time(old.dir);
...@@ -3855,14 +3855,14 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -3855,14 +3855,14 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
if (retval) if (retval)
goto end_rename; goto end_rename;
ext4_dec_count(handle, old.dir); ext4_dec_count(old.dir);
if (new.inode) { if (new.inode) {
/* checked ext4_empty_dir above, can't have another /* checked ext4_empty_dir above, can't have another
* parent, ext4_dec_count() won't work for many-linked * parent, ext4_dec_count() won't work for many-linked
* dirs */ * dirs */
clear_nlink(new.inode); clear_nlink(new.inode);
} else { } else {
ext4_inc_count(handle, new.dir); ext4_inc_count(new.dir);
ext4_update_dx_flag(new.dir); ext4_update_dx_flag(new.dir);
retval = ext4_mark_inode_dirty(handle, new.dir); retval = ext4_mark_inode_dirty(handle, new.dir);
if (unlikely(retval)) if (unlikely(retval))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment