ovl: disable decoding null uuid with redirect_dir
authorVyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>
Thu, 27 May 2021 17:45:45 +0000 (19:45 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 17 Aug 2021 09:47:44 +0000 (11:47 +0200)
Currently decoding origin with lower null uuid is not allowed unless user
opted-in to one of the new features that require following the lower inode
of non-dir upper (index, xino, metacopy). Now we add redirect_dir too to
that feature list.

Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/super.c

index b01d4147520d3e340a2b6fe3aa76ffd0efd4e402..97ea35fdd933f81bb9c4a354726f38661b108825 100644 (file)
@@ -1600,7 +1600,7 @@ static bool ovl_lower_uuid_ok(struct ovl_fs *ofs, const uuid_t *uuid)
         * lower inode of non-dir upper.
         */
        if (!ofs->config.index && !ofs->config.metacopy &&
-           ofs->config.xino != OVL_XINO_ON &&
+           !ofs->config.redirect_dir && ofs->config.xino != OVL_XINO_ON &&
            uuid_is_null(uuid))
                return false;