From: Vasily Averin <vvs@virtuozzo.com>
To: linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>,
linux-kernel@vger.kernel.org, Tahsin Erdogan <tahsin@google.com>
Subject: [PATCH v2 10/11] ext4: remove useless brelse call in ext4_xattr_inode_update_ref()
Date: Wed, 31 Oct 2018 00:58:46 +0300 [thread overview]
Message-ID: <fb87bcc2-5e4a-34ba-a063-3f43e9de976c@virtuozzo.com> (raw)
In-Reply-To: <cover.1540935522.git.vvs@virtuozzo.com>
brelse(iloc.bh) is useless here, it is always called with iloc.bh = NULL
Fixes dec214d00e0d ("ext4: xattr inode deduplication") # 4.13
cc: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
fs/ext4/xattr.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index f36fc5d5b257..dc1aeab06dba 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1031,10 +1031,8 @@ static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode,
inode_lock(ea_inode);
ret = ext4_reserve_inode_write(handle, ea_inode, &iloc);
- if (ret) {
- iloc.bh = NULL;
+ if (ret)
goto out;
- }
ref_count = ext4_xattr_inode_get_ref(ea_inode);
ref_count += ref_change;
@@ -1080,12 +1078,10 @@ static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode,
}
ret = ext4_mark_iloc_dirty(handle, ea_inode, &iloc);
- iloc.bh = NULL;
if (ret)
ext4_warning_inode(ea_inode,
"ext4_mark_iloc_dirty() failed ret=%d", ret);
out:
- brelse(iloc.bh);
inode_unlock(ea_inode);
return ret;
}
--
2.17.1
next prev parent reply other threads:[~2018-10-30 21:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1540935522.git.vvs@virtuozzo.com>
2018-10-30 21:57 ` [PATCH v2 01/11] ext4 resise: extra brelse in setup_new_flex_group_blocks() Vasily Averin
2018-11-03 20:20 ` Theodore Y. Ts'o
2018-10-30 21:57 ` [PATCH v2 02/11] ext4 resize: missing brelse() after errors in set_flexbg_block_bitmap() Vasily Averin
2018-11-03 20:28 ` Theodore Y. Ts'o
2018-10-30 21:57 ` [PATCH v2 03/11] ext4 resize: brelse() cleanup in add_new_gdb_meta_bg() Vasily Averin
2018-11-03 20:55 ` Theodore Y. Ts'o
2018-10-30 21:58 ` [PATCH v2 04/11] ext4 resize: lost brelse() in update_backups() Vasily Averin
2018-11-03 21:14 ` Theodore Y. Ts'o
2018-10-30 21:58 ` [PATCH v2 05/11] ext4 resize: lost rollback in ext4_resize_fs() Vasily Averin
2018-11-06 21:17 ` Theodore Y. Ts'o
2018-10-30 21:58 ` [PATCH v2 06/11] ext4 resize: lost resize_inode cleanup before retry " Vasily Averin
2018-11-06 21:23 ` Theodore Y. Ts'o
2018-10-30 21:58 ` [PATCH v2 07/11] ext4: lost put_bh in ext4_mark_iloc_dirty() Vasily Averin
2018-11-06 21:53 ` Theodore Y. Ts'o
2018-10-30 21:58 ` [PATCH v2 08/11] ext4: lost brelse in ext4_orphan_add() Vasily Averin
2018-11-06 22:04 ` Theodore Y. Ts'o
2018-10-30 21:58 ` [PATCH v2 09/11] ext4: iloc.bh cleanup in add_new_gdb() Vasily Averin
2018-11-06 22:19 ` Theodore Y. Ts'o
2018-10-30 21:58 ` Vasily Averin [this message]
2018-11-06 22:49 ` [PATCH v2 10/11] ext4: remove useless brelse call in ext4_xattr_inode_update_ref() Theodore Y. Ts'o
2018-10-30 21:58 ` [PATCH v2 11/11] ext4: access to uninitialized bh fields in ext4_xattr_set_handle() Vasily Averin
[not found] ` <48BA929C-9BF7-4092-BDD3-BECB64AF0599@dilger.ca>
2018-10-31 3:39 ` Vasily Averin
2018-11-01 0:42 ` Andreas Dilger
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=fb87bcc2-5e4a-34ba-a063-3f43e9de976c@virtuozzo.com \
--to=vvs@virtuozzo.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tahsin@google.com \
--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 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).