From: Joanne Koong <joannelkoong@gmail.com>
To: miklos@szeredi.hu
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH v1 2/4] fuse: get rid of err_unlock goto in fuse_dev_do_read()
Date: Thu, 5 Mar 2026 17:05:23 -0800 [thread overview]
Message-ID: <20260306010525.4105958-3-joannelkoong@gmail.com> (raw)
In-Reply-To: <20260306010525.4105958-1-joannelkoong@gmail.com>
There is one user of the err_unlock goto. Get rid of it and make the
code simpler.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
---
fs/fuse/dev.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index e57ede7351b9..8a0a541f3fba 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1438,8 +1438,8 @@ static ssize_t fuse_dev_do_read(struct fuse_dev *fud, struct file *file,
}
if (!fiq->connected) {
- err = fc->aborted ? -ECONNABORTED : -ENODEV;
- goto err_unlock;
+ spin_unlock(&fiq->lock);
+ return fc->aborted ? -ECONNABORTED : -ENODEV;
}
if (!list_empty(&fiq->interrupts)) {
@@ -1524,10 +1524,6 @@ static ssize_t fuse_dev_do_read(struct fuse_dev *fud, struct file *file,
spin_unlock(&fpq->lock);
fuse_request_end(req);
return err;
-
- err_unlock:
- spin_unlock(&fiq->lock);
- return err;
}
static int fuse_dev_open(struct inode *inode, struct file *file)
--
2.47.3
next prev parent reply other threads:[~2026-03-06 1:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 1:05 [PATCH v1 0/4] fuse: fuse_dev_do_read() cleanups Joanne Koong
2026-03-06 1:05 ` [PATCH v1 1/4] fuse: remove redundant buffer size checks for interrupt and forget requests Joanne Koong
2026-03-06 1:05 ` Joanne Koong [this message]
2026-03-06 1:05 ` [PATCH v1 3/4] fuse: remove stray newline in fuse_dev_do_read() Joanne Koong
2026-03-06 1:05 ` [PATCH v1 4/4] fuse: clean up interrupt reading Joanne Koong
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=20260306010525.4105958-3-joannelkoong@gmail.com \
--to=joannelkoong@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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