Unverified Commit 527c88d8 authored by Amir Goldstein's avatar Amir Goldstein Committed by Christian Brauner
Browse files

ovl: fix debug print in case of mkdir error



We want to print the name in case of mkdir failure and now we will
get a cryptic (efault) as name.

Fixes: c54b3869 ("VFS: Change vfs_mkdir() to return the dentry.")
Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/20250612072245.2825938-1-amir73il@gmail.com


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent ad5a0351
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -246,9 +246,11 @@ static inline struct dentry *ovl_do_mkdir(struct ovl_fs *ofs,
					  struct dentry *dentry,
					  umode_t mode)
{
	dentry = vfs_mkdir(ovl_upper_mnt_idmap(ofs), dir, dentry, mode);
	pr_debug("mkdir(%pd2, 0%o) = %i\n", dentry, mode, PTR_ERR_OR_ZERO(dentry));
	return dentry;
	struct dentry *ret;

	ret = vfs_mkdir(ovl_upper_mnt_idmap(ofs), dir, dentry, mode);
	pr_debug("mkdir(%pd2, 0%o) = %i\n", dentry, mode, PTR_ERR_OR_ZERO(ret));
	return ret;
}

static inline int ovl_do_mknod(struct ovl_fs *ofs,