summaryrefslogtreecommitdiff
path: root/fs/overlayfs/dir.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2017-07-04 22:03:18 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2017-07-04 22:03:18 +0200
commit55acc6618259c8ff0a400a131f0f4b613e96010a (patch)
tree82f73eccca8d417ec8c77ad1b02dd28748c5c456 /fs/overlayfs/dir.c
parent23f0ab13eaa69b4a351184cbec448be2aad3a3a9 (diff)
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 <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/dir.c')
-rw-r--r--fs/overlayfs/dir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c
index a072c27e03bc..8b2b23181b19 100644
--- a/fs/overlayfs/dir.c
+++ b/fs/overlayfs/dir.c
@@ -156,6 +156,7 @@ static void ovl_instantiate(struct dentry *dentry, struct inode *inode,
struct dentry *newdentry, bool hardlink)
{
ovl_dentry_version_inc(dentry->d_parent);
+ ovl_dentry_set_upper_alias(dentry);
if (!hardlink) {
ovl_inode_update(inode, newdentry);
ovl_copyattr(newdentry->d_inode, inode);