jfs: Use more common error handling code in jfs_readdir()
Subsystems (2)
PATCH 1/1 jfs: Use more common error handling code in jfs_readdir()
From: Markus Elfring <[email protected]>
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 <[email protected]>
--- fs/jfs/jfs_dtree.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
fs/jfs/jfs_dtree.c +2 -4
@@ -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:
Signature · 1 line
2.54.0