linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: Remove unused argument from ext4_(inc|dec)_count
@ 2020-08-26 13:31 Nikolay Borisov
  2020-08-26 13:50 ` Ritesh Harjani
  2020-10-03  4:08 ` Theodore Y. Ts'o
  0 siblings, 2 replies; 3+ messages in thread
From: Nikolay Borisov @ 2020-08-26 13:31 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso, adilger.kernel, Nikolay Borisov

The 'handle' argument is not used for anything so simply remove it.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 fs/ext4/namei.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 56738b538ddf..b411f843e469 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2546,7 +2546,7 @@ static int ext4_delete_entry(handle_t *handle,
  * 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.
  */
-static void ext4_inc_count(handle_t *handle, struct inode *inode)
+static void ext4_inc_count(struct inode *inode)
 {
 	inc_nlink(inode);
 	if (is_dx(inode) &&
@@ -2558,7 +2558,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
  * 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)
 		drop_nlink(inode);
@@ -2817,7 +2817,7 @@ static int ext4_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 		iput(inode);
 		goto out_retry;
 	}
-	ext4_inc_count(handle, dir);
+	ext4_inc_count(dir);
 	ext4_update_dx_flag(dir);
 	err = ext4_mark_inode_dirty(handle, dir);
 	if (err)
@@ -3155,7 +3155,7 @@ static int ext4_rmdir(struct inode *dir, struct dentry *dentry)
 	retval = ext4_mark_inode_dirty(handle, inode);
 	if (retval)
 		goto end_rmdir;
-	ext4_dec_count(handle, dir);
+	ext4_dec_count(dir);
 	ext4_update_dx_flag(dir);
 	retval = ext4_mark_inode_dirty(handle, dir);

@@ -3422,7 +3422,7 @@ static int ext4_link(struct dentry *old_dentry,
 		ext4_handle_sync(handle);

 	inode->i_ctime = current_time(inode);
-	ext4_inc_count(handle, inode);
+	ext4_inc_count(inode);
 	ihold(inode);

 	err = ext4_add_entry(handle, dentry, inode);
@@ -3619,9 +3619,9 @@ static void ext4_update_dir_count(handle_t *handle, struct ext4_renament *ent)
 {
 	if (ent->dir_nlink_delta) {
 		if (ent->dir_nlink_delta == -1)
-			ext4_dec_count(handle, ent->dir);
+			ext4_dec_count(ent->dir);
 		else
-			ext4_inc_count(handle, ent->dir);
+			ext4_inc_count(ent->dir);
 		ext4_mark_inode_dirty(handle, ent->dir);
 	}
 }
@@ -3833,7 +3833,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
 	}

 	if (new.inode) {
-		ext4_dec_count(handle, new.inode);
+		ext4_dec_count(new.inode);
 		new.inode->i_ctime = current_time(new.inode);
 	}
 	old.dir->i_ctime = old.dir->i_mtime = current_time(old.dir);
@@ -3843,14 +3843,14 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
 		if (retval)
 			goto end_rename;

-		ext4_dec_count(handle, old.dir);
+		ext4_dec_count(old.dir);
 		if (new.inode) {
 			/* checked ext4_empty_dir above, can't have another
 			 * parent, ext4_dec_count() won't work for many-linked
 			 * dirs */
 			clear_nlink(new.inode);
 		} else {
-			ext4_inc_count(handle, new.dir);
+			ext4_inc_count(new.dir);
 			ext4_update_dx_flag(new.dir);
 			retval = ext4_mark_inode_dirty(handle, new.dir);
 			if (unlikely(retval))
--
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ext4: Remove unused argument from ext4_(inc|dec)_count
  2020-08-26 13:31 [PATCH] ext4: Remove unused argument from ext4_(inc|dec)_count Nikolay Borisov
@ 2020-08-26 13:50 ` Ritesh Harjani
  2020-10-03  4:08 ` Theodore Y. Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Ritesh Harjani @ 2020-08-26 13:50 UTC (permalink / raw)
  To: Nikolay Borisov, linux-ext4; +Cc: tytso, adilger.kernel



On 8/26/20 7:01 PM, Nikolay Borisov wrote:
> The 'handle' argument is not used for anything so simply remove it.
> 
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>

Nice catch. Looks good to me, feel free to add.
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ext4: Remove unused argument from ext4_(inc|dec)_count
  2020-08-26 13:31 [PATCH] ext4: Remove unused argument from ext4_(inc|dec)_count Nikolay Borisov
  2020-08-26 13:50 ` Ritesh Harjani
@ 2020-10-03  4:08 ` Theodore Y. Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Theodore Y. Ts'o @ 2020-10-03  4:08 UTC (permalink / raw)
  To: Nikolay Borisov; +Cc: linux-ext4, adilger.kernel

On Wed, Aug 26, 2020 at 04:31:16PM +0300, Nikolay Borisov wrote:
> The 'handle' argument is not used for anything so simply remove it.
> 
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>

Applied, thanks.

					- Ted

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-03  4:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26 13:31 [PATCH] ext4: Remove unused argument from ext4_(inc|dec)_count Nikolay Borisov
2020-08-26 13:50 ` Ritesh Harjani
2020-10-03  4:08 ` Theodore Y. Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).