From cd91304e7190b4c4802f8e413ab2214b233e0260 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Tue, 5 Sep 2017 12:53:11 +0200 Subject: ovl: fix relatime for directories Need to treat non-regular overlayfs files the same as regular files when checking for an atime update. Add a d_real() flag to make it return the upper dentry for all file types. Reported-by: "zhangyi (F)" Signed-off-by: Miklos Szeredi --- include/linux/dcache.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/dcache.h') diff --git a/include/linux/dcache.h b/include/linux/dcache.h index fd0721e520f4..ed1a7cf6923a 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -562,6 +562,9 @@ static inline struct dentry *d_backing_dentry(struct dentry *upper) return upper; } +/* d_real() flags */ +#define D_REAL_UPPER 0x2 /* return upper dentry or NULL if non-upper */ + /** * d_real - Return the real dentry * @dentry: the dentry to query -- cgit