]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Apparmor: Use simple_start_creating() / simple_done_creating()
authorNeilBrown <neil@brown.name>
Tue, 24 Feb 2026 22:16:50 +0000 (09:16 +1100)
committerChristian Brauner <brauner@kernel.org>
Fri, 6 Mar 2026 09:24:11 +0000 (10:24 +0100)
commit5c6c7ae93236ee46be8e9ac396af2de5d222986c
treee322adb9fb85eae7c32e455a7a524728d26702fb
parent1948172bddabef7f9ca46d3e965e71eb93a0dcc5
Apparmor: Use simple_start_creating() / simple_done_creating()

Instead of explicitly locking the parent and performing a look up in
apparmor, use simple_start_creating(), and then simple_done_creating()
to unlock and drop the dentry.

This removes the need to check for an existing entry (as
simple_start_creating() acts like an exclusive create and can return
-EEXIST), simplifies error paths, and keeps dir locking code
centralised.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neil@brown.name>
Link: https://patch.msgid.link/20260224222542.3458677-6-neilb@ownmail.net
Signed-off-by: Christian Brauner <brauner@kernel.org>
security/apparmor/apparmorfs.c