From: Jan Kara <jack@suse.cz>
To: linux-ext4@vger.kernel.org
Cc: Ted Tso <tytso@mit.edu>, Jan Kara <jack@suse.cz>
Subject: [PATCH 2/5] jbd2: Simplify error path on allocation failure in do_get_write_access()
Date: Thu, 2 Apr 2015 15:58:17 +0200 [thread overview]
Message-ID: <1427983100-29889-3-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1427983100-29889-1-git-send-email-jack@suse.cz>
We were acquiring bh_state_lock when allocation of buffer failed in
do_get_write_access() only to be able to jump to a label that releases
the lock and does all other checks that don't make sense for this error
path. Just jump into the right label instead.
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/jbd2/transaction.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 2b75f0f109be..1995ea539e96 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -956,8 +956,7 @@ repeat:
__func__);
JBUFFER_TRACE(jh, "oom!");
error = -ENOMEM;
- jbd_lock_bh_state(bh);
- goto done;
+ goto out;
}
goto repeat;
}
--
2.1.4
next prev parent reply other threads:[~2015-04-02 13:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-02 13:58 [PATCH 0/5] jbd2: Avoid unnecessary locking when buffer is already journaled Jan Kara
2015-04-02 13:58 ` [PATCH 1/5] jbd2: Simplify code flow in do_get_write_access() Jan Kara
2015-06-08 16:39 ` Theodore Ts'o
2015-04-02 13:58 ` Jan Kara [this message]
2015-06-08 16:42 ` [PATCH 2/5] jbd2: Simplify error path on allocation failure " Theodore Ts'o
2015-04-02 13:58 ` [PATCH 3/5] jbd2: Simplify code flow " Jan Kara
2015-06-08 16:45 ` Theodore Ts'o
2015-04-02 13:58 ` [PATCH 4/5] jbd2: Speedup jbd2_journal_get_[write|undo]_access() Jan Kara
2015-06-08 16:47 ` Theodore Ts'o
2015-06-08 22:32 ` Theodore Ts'o
2015-06-09 5:24 ` Theodore Ts'o
2015-06-17 16:39 ` Jan Kara
2015-06-17 16:56 ` Jan Kara
[not found] ` <CAA1ppbhojR0aaDr-BUWQLWQDo5+sO9Tc6b=Dxf5XrRAr2DT0oQ@mail.gmail.com>
2015-06-18 8:52 ` Jan Kara
2015-06-21 1:56 ` Theodore Ts'o
2015-04-02 13:58 ` [PATCH 5/5] jbd2: Speedup jbd2_journal_dirty_metadata() Jan Kara
2015-06-08 16:50 ` Theodore Ts'o
2015-04-02 14:23 ` [PATCH 0/5] jbd2: Avoid unnecessary locking when buffer is already journaled Theodore Ts'o
2015-04-12 10:09 ` Dmitry Monakhov
2015-04-16 10:46 ` Jan Kara
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=1427983100-29889-3-git-send-email-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 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).