From: Markus Elfring <Markus.Elfring@web.de>
To: jfs-discussion@lists.sourceforge.net,
Arnd Bergmann <arnd@arndb.de>, Dave Kleikamp <shaggy@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Yun Zhou <yun.zhou@windriver.com>,
Zheng Yu <zheng.yu@northwestern.edu>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] jfs: Use more common error handling code in jfs_readdir()
Date: Tue, 16 Jun 2026 20:00:24 +0200 [thread overview]
Message-ID: <46883bdb-ad86-4814-8d33-98e2a342e31a@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 16 Jun 2026 19:50:07 +0200
Use an existing label once more so that a bit of exception handling can be
better reused at the end of this function implementation.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
fs/jfs/jfs_dtree.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c
index 8ce6e4458cc2..f0efdffb9e5c 100644
--- a/fs/jfs/jfs_dtree.c
+++ b/fs/jfs/jfs_dtree.c
@@ -3036,10 +3036,8 @@ int jfs_readdir(struct file *file, struct dir_context *ctx)
}
DT_GETPAGE(ip, bn, mp, PSIZE, p, rc);
- if (rc) {
- kfree(dirent_buf);
- return rc;
- }
+ if (rc)
+ goto out;
}
out:
--
2.54.0
reply other threads:[~2026-06-16 18:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=46883bdb-ad86-4814-8d33-98e2a342e31a@web.de \
--to=markus.elfring@web.de \
--cc=arnd@arndb.de \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rppt@kernel.org \
--cc=shaggy@kernel.org \
--cc=yun.zhou@windriver.com \
--cc=zheng.yu@northwestern.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
all inboxes | Powered by JetHome®