From: Miklos Szeredi Date: Wed, 18 Jul 2018 13:44:41 +0000 (+0200) Subject: ovl: deal with overlay files in ovl_d_real() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e8c985bace1351c5f2d7a6f0d8ff3e677b58abb5;p=openwrt%2Fstaging%2Fblogic.git ovl: deal with overlay files in ovl_d_real() Signed-off-by: Miklos Szeredi --- diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 704b37311467..211975921a90 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -97,6 +97,10 @@ static struct dentry *ovl_d_real(struct dentry *dentry, struct dentry *real; int err; + /* It's an overlay file */ + if (inode && d_inode(dentry) == inode) + return dentry; + if (flags & D_REAL_UPPER) return ovl_dentry_upper(dentry);