summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2018-07-18 15:44:41 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2018-07-18 15:44:41 +0200
commite8c985bace1351c5f2d7a6f0d8ff3e677b58abb5 (patch)
tree95957a1444389e3c26a26818b24fd140f6050109 /fs/overlayfs
parent46e5d0a3907ba489fda4f7b043439a3599184f91 (diff)
downloadlinux-e8c985bace1351c5f2d7a6f0d8ff3e677b58abb5.tar.bz2
ovl: deal with overlay files in ovl_d_real()
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/super.c4
1 files changed, 4 insertions, 0 deletions
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);