[PATCH v3 04/15] libfs: change simple_done_creating() to use end_creating()

Jeff Layton jlayton at kernel.org
Mon Mar 2 20:11:21 UTC 2026


On Wed, 2026-02-25 at 09:16 +1100, NeilBrown wrote:
> From: NeilBrown <neil at brown.name>
> 
> simple_done_creating() and end_creating() are identical.
> So change the former to use the latter.  This further centralises
> unlocking of directories.
> 
> Signed-off-by: NeilBrown <neil at brown.name>
> ---
>  fs/libfs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/libfs.c b/fs/libfs.c
> index 74134ba2e8d1..63b4fb082435 100644
> --- a/fs/libfs.c
> +++ b/fs/libfs.c
> @@ -2318,7 +2318,6 @@ EXPORT_SYMBOL(simple_start_creating);
>  /* parent must have been held exclusive since simple_start_creating() */
>  void simple_done_creating(struct dentry *child)
>  {
> -	inode_unlock(child->d_parent->d_inode);
> -	dput(child);
> +	end_creating(child);
>  }
>  EXPORT_SYMBOL(simple_done_creating);

Reviewed-by: Jeff Layton <jlayton at kernel.org>



More information about the Linux-security-module-archive mailing list