[PATCH] ovl: fix debug print in case of mkdir error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---

Christian,

Another candidate for vfs.fixes from fallout of vfs API changes.

I noticed it by chance when reviewing Neil's new vfs_mkdir() patch.

TBH, I don't even remember seeing the v6.15 patch during review.
the patch review timestamp suggest I might have been on vacation
at the time and then must have gotten burried in my mailbox.

That is the second ovl regression that got in due to vfs API changes
that has no record on list of being reviewed by ovl developers.

I think we need to be a bit more careful in the progress of Neil's
work that the ovl parts are better reviewed and tested.

Neil, if you need help setting up fstests overlayfs testing
let me know (or read fstests README.overlay).

Thanks,
Amir.

 fs/overlayfs/overlayfs.h | 8 +++++---
 1 file 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,
-- 
2.34.1





[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux