All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Ted Tso <tytso@mit.edu>
Cc: <linux-ext4@vger.kernel.org>, Jan Kara <jack@suse.cz>
Subject: [PATCH 3/3] ext4: Drop duplicate ea_inode handling in ext4_xattr_block_set()
Date: Fri,  9 Feb 2024 12:21:01 +0100	[thread overview]
Message-ID: <20240209112107.10585-3-jack@suse.cz> (raw)
In-Reply-To: <20240209111418.22308-1-jack@suse.cz>

ext4_xattr_block_set() drops ea_inode reference in two places. Handling
it just under the 'cleanup' label is enough so drop the second
occurence.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ext4/xattr.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index e7e1ffff8eba..040a40908f39 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -2127,17 +2127,6 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
 						      ENTRY(header(s->base)+1));
 			if (error)
 				goto getblk_failed;
-			if (ea_inode) {
-				/* Drop the extra ref on ea_inode. */
-				error = ext4_xattr_inode_dec_ref(handle,
-								 ea_inode);
-				if (error)
-					ext4_warning_inode(ea_inode,
-							   "dec ref error=%d",
-							   error);
-				iput(ea_inode);
-				ea_inode = NULL;
-			}
 
 			lock_buffer(new_bh);
 			error = ext4_journal_get_create_access(handle, sb,
-- 
2.35.3


  parent reply	other threads:[~2024-02-09 11:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 11:20 [PATCH 0/3] ext4: Create EA inodes outside of buffer lock Jan Kara
2024-03-21 16:26 ` [PATCH 0/2 v2] " Jan Kara
2024-02-09 11:20 ` [PATCH 1/3] ext4: Fold quota accounting into ext4_xattr_inode_lookup_create() Jan Kara
2024-02-09 11:21 ` [PATCH 2/3] ext4: Do not create EA inode under buffer lock Jan Kara
2024-02-29 15:59   ` Theodore Ts'o
2024-03-14 18:12     ` Jan Kara
2024-02-09 11:21 ` Jan Kara [this message]
2024-02-22 15:54 ` [PATCH 0/3] ext4: Create EA inodes outside of " Theodore Ts'o
2024-03-21 16:26 ` [PATCH 1/2] Revert "ext4: drop duplicate ea_inode handling in ext4_xattr_block_set()" Jan Kara
2024-05-03  4:02   ` Theodore Ts'o
2024-03-21 16:26 ` [PATCH 2/2] ext4: Do not create EA inode under buffer lock Jan Kara
2024-03-22 18:06   ` Andreas Dilger
2024-03-25 19:03     ` Jan Kara
2024-05-03  4:03   ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240209112107.10585-3-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.