BUG? Missing dput() in ovl_permissions().
I apologize for not having tested this on the latest kernel. I hit this bug in SUSE SLES12 and by inspection it still appears to be in Linus's kernel.
Failure to free dentry. Missing dput() using default_permissions in ovl_permission().
# mount overlayfs with default_permissions mkdir l u m mount -t tmpfs tmpfs u mount -t overlayfs -o upperdir=u,lowerdir=l,default_permissions overlayfs m dd if=/dev/zero of=m/test_dput bs=4096b count=1000 df u l m rm m/test_dput df u l m # tmpfs space is not freed!
umount m u
# BUG. Dentry still in use!
It appears that there may be a missing dput() in the ovl_is_default_permissions(inode) path of ovl_permission().
I hit this in SUSE because default_permissions was getting set by accident due to uninitialized data in ovl_config (kalloc vs. kzalloc). This bug is fixed upstream.
-Eric Jones