]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ovl: fix origin verification of index dir
authorAmir Goldstein <amir73il@gmail.com>
Tue, 11 Jul 2017 12:58:36 +0000 (15:58 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 13 Jul 2017 20:06:46 +0000 (22:06 +0200)
Commit 54fb347e836f ("ovl: verify index dir matches upper dir")
introduced a new ovl_fh flag OVL_FH_FLAG_PATH_UPPER to indicate
an upper file handle, but forgot to add the flag to the mask of
valid flags, so index dir origin verification always discards
existing origin and stores a new one.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/overlayfs.h

index 60d26605e039ede4fb95c68a54090b97baf80801..032120a761c4cd269d917894a6176d849fd3a6a6 100644 (file)
@@ -47,7 +47,8 @@ enum ovl_flag {
 /* Is the real inode encoded in fid an upper inode? */
 #define OVL_FH_FLAG_PATH_UPPER (1 << 2)
 
-#define OVL_FH_FLAG_ALL (OVL_FH_FLAG_BIG_ENDIAN | OVL_FH_FLAG_ANY_ENDIAN)
+#define OVL_FH_FLAG_ALL (OVL_FH_FLAG_BIG_ENDIAN | OVL_FH_FLAG_ANY_ENDIAN | \
+                        OVL_FH_FLAG_PATH_UPPER)
 
 #if defined(__LITTLE_ENDIAN)
 #define OVL_FH_FLAG_CPU_ENDIAN 0