[PATCH v11 11/18] ovl: Allocate bigger stack for origin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
 	if (!*stackp) {
 		dput(origin);
 		return -ENOMEM;
-- 
2.13.6

--
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



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux