On Wed, Jan 31, 2018 at 11:13 PM, Vivek Goyal <vgoyal@xxxxxxxxxx> wrote: > Right now there is only one origin for upper dentry and we allocate space > to hold only one ovl_path. But with metacopy support, it is possible that > lower origin is a metacopy itself and we will continue the search for > lower most data entry and install that too in lower stack so that this > entry can be used for copy up later. > > Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx> > --- > fs/overlayfs/namei.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c > index 27a069cd2bf4..ddb73b5a06d4 100644 > --- a/fs/overlayfs/namei.c > +++ b/fs/overlayfs/namei.c > @@ -361,7 +361,8 @@ static int ovl_check_origin(struct dentry *upperdentry, > > BUG_ON(*ctrp); > if (!*stackp) > - *stackp = kmalloc(sizeof(struct ovl_path), GFP_KERNEL); > + *stackp = kmalloc(sizeof(struct ovl_path) * numlower, > + GFP_KERNEL); I guess you forgot to change that size to 2... Amir. -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html