lkml.org 
[lkml]   [2018]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/39] ovl: deal with overlay files in ovl_d_real()
Date
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
---
fs/overlayfs/super.c | 4 ++++
1 file changed, 4 insertions(+)

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);

--
2.14.3
\
 
 \ /
  Last update: 2018-05-29 17:15    [W:0.289 / U:2.756 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site