ovl: introduce data-only lower layers
[platform/kernel/linux-rpi.git] / fs / overlayfs / namei.c
index 8ea2a83..5c1b039 100644 (file)
@@ -356,7 +356,7 @@ int ovl_check_origin_fh(struct ovl_fs *ofs, struct ovl_fh *fh, bool connected,
        struct dentry *origin = NULL;
        int i;
 
-       for (i = 1; i < ofs->numlayer; i++) {
+       for (i = 1; i <= ovl_numlowerlayer(ofs); i++) {
                /*
                 * If lower fs uuid is not unique among lower fs we cannot match
                 * fh->uuid to layer.