diff options
author | Amir Goldstein <amir73il@gmail.com> | 2025-06-12 10:22:45 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-06-12 15:25:24 +0300 |
commit | 527c88d8390d6c0358dea4d71696795c05328925 (patch) | |
tree | c7b0235c0bb5f2f835811aa4f6de4d2e2639d8fc | |
parent | ad5a0351064c8f744416df3a49156d2c61af5bc0 (diff) | |
download | linux-527c88d8390d6c0358dea4d71696795c05328925.tar.xz |
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: c54b386969a5 ("VFS: Change vfs_mkdir() to return the dentry.")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/20250612072245.2825938-1-amir73il@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r-- | fs/overlayfs/overlayfs.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index 8baaba0a3fe5..497323128e5f 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -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, |