Skip to content

Commit 527c88d

Browse files
amir73ilbrauner
authored andcommitted
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: c54b386 ("VFS: Change vfs_mkdir() to return the dentry.") Signed-off-by: Amir Goldstein <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent ad5a035 commit 527c88d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

fs/overlayfs/overlayfs.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,11 @@ static inline struct dentry *ovl_do_mkdir(struct ovl_fs *ofs,
246246
struct dentry *dentry,
247247
umode_t mode)
248248
{
249-
dentry = vfs_mkdir(ovl_upper_mnt_idmap(ofs), dir, dentry, mode);
250-
pr_debug("mkdir(%pd2, 0%o) = %i\n", dentry, mode, PTR_ERR_OR_ZERO(dentry));
251-
return dentry;
249+
struct dentry *ret;
250+
251+
ret = vfs_mkdir(ovl_upper_mnt_idmap(ofs), dir, dentry, mode);
252+
pr_debug("mkdir(%pd2, 0%o) = %i\n", dentry, mode, PTR_ERR_OR_ZERO(ret));
253+
return ret;
252254
}
253255

254256
static inline int ovl_do_mknod(struct ovl_fs *ofs,

0 commit comments

Comments
 (0)