From: Li Wang Date: Fri, 10 Apr 2026 02:34:33 +0000 (+0800) Subject: fuse: drop redundant err assignment in fuse_create_open() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c72b1f0e2a284f6c775789a7a52f772a1052d3e;p=thirdparty%2Fkernel%2Flinux.git fuse: drop redundant err assignment in fuse_create_open() In fuse_create_open(), err is initialized to -ENOMEM immediately before the fuse_alloc_forget() NULL check. If forget allocation fails, it branches to out_err with that value. If it succeeds, it falls through without modifying err, so err is still -ENOMEM at the point where fuse_file_alloc() is called. The second err = -ENOMEM before fuse_file_alloc() therefore is redundant. Signed-off-by: Li Wang Reviewed-by: Joanne Koong Signed-off-by: Miklos Szeredi --- diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 0ceb49337a442..2872e068c3178 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -838,7 +838,6 @@ static int fuse_create_open(struct mnt_idmap *idmap, struct inode *dir, if (!forget) goto out_err; - err = -ENOMEM; ff = fuse_file_alloc(fm, true); if (!ff) goto out_put_forget_req;