public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tyler Hicks <code@tyhicks.com>
To: NeilBrown <neil@brown.name>,
	Christian Brauner <brauner@kernel.org>,
	Jeff Layton <jlayton@kernel.org>,
	Amir Goldstein <amir73il@gmail.com>
Cc: ecryptfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] ecryptfs: Fix improper mknod pairing of start_creating()/end_removing()
Date: Tue, 23 Dec 2025 13:41:52 -0600	[thread overview]
Message-ID: <20251223194153.2818445-2-code@tyhicks.com> (raw)
In-Reply-To: <20251223194153.2818445-1-code@tyhicks.com>

The ecryptfs_start_creating_dentry() function must be paired with the
end_creating() function. Fix ecryptfs_mknod() so that end_creating() is
properly called in the return path, instead of end_removing().

Fixes: f046fbb4d81d ("ecryptfs: use new start_creating/start_removing APIs")
Signed-off-by: Tyler Hicks <code@tyhicks.com>
---
 fs/ecryptfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 3978248247dc..e73d9de676a6 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -584,7 +584,7 @@ ecryptfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
 	fsstack_copy_attr_times(dir, lower_dir);
 	fsstack_copy_inode_size(dir, lower_dir);
 out:
-	end_removing(lower_dentry);
+	end_creating(lower_dentry);
 	if (d_really_is_negative(dentry))
 		d_drop(dentry);
 	return rc;
-- 
2.43.0


  reply	other threads:[~2025-12-23 19:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23 19:41 [PATCH 0/2] Fix two regressions from start_creating()/start_removing() conversion Tyler Hicks
2025-12-23 19:41 ` Tyler Hicks [this message]
2025-12-24  6:23   ` [PATCH 1/2] ecryptfs: Fix improper mknod pairing of start_creating()/end_removing() Amir Goldstein
2025-12-23 19:41 ` [PATCH 2/2] ecryptfs: Release lower parent dentry after creating dir Tyler Hicks
2025-12-24  6:37   ` Amir Goldstein
2025-12-24  6:31 ` [PATCH 0/2] Fix two regressions from start_creating()/start_removing() conversion Amir Goldstein
2025-12-24 14:47   ` Tyler Hicks
2025-12-24 12:58 ` Christian Brauner
2025-12-27  1:05 ` NeilBrown
2025-12-27 18:15   ` Amir Goldstein
2025-12-30  3:30     ` Tyler Hicks

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=20251223194153.2818445-2-code@tyhicks.com \
    --to=code@tyhicks.com \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=ecryptfs@vger.kernel.org \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil@brown.name \
    /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