From 55acc6618259c8ff0a400a131f0f4b613e96010a Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Tue, 4 Jul 2017 22:03:18 +0200 Subject: ovl: add flag for upper in ovl_entry For rename, we need to ensure that an upper alias exists for hard links before attempting the operation. Introduce a flag in ovl_entry to track the state of the upper alias. Signed-off-by: Miklos Szeredi --- fs/overlayfs/ovl_entry.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fs/overlayfs/ovl_entry.h') diff --git a/fs/overlayfs/ovl_entry.h b/fs/overlayfs/ovl_entry.h index 9642ec64467b..878a750986dd 100644 --- a/fs/overlayfs/ovl_entry.h +++ b/fs/overlayfs/ovl_entry.h @@ -42,7 +42,10 @@ struct ovl_fs { /* private information held for every overlayfs dentry */ struct ovl_entry { union { - bool opaque; + struct { + unsigned long has_upper; + bool opaque; + }; struct rcu_head rcu; }; unsigned numlower; -- cgit v1.2.3-59-g8ed1b