[PATCH] ovl: whiteout of lower dir should't dispaly in merge dir.

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

 



From: Aihua Zhang <zhangaihua1@xxxxxxxxxx>

mount -t overlay overlay -olowerdir=/lower,upperdir=/upper,workdir=/workdir  /merge
ls /lower/test_dir
whiteout

ls /merge/test_dir
whiteout   ------should't display here

this patch fixed it.

Signed-off-by: Aihua Zhang <zhangaihua1@xxxxxxxxxx>
---
 fs/overlayfs/readdir.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index cf37fc7..21cd5a4 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -362,7 +362,7 @@ static int ovl_iterate(struct file *file, struct dir_context *ctx)
 	if (!ctx->pos)
 		ovl_dir_reset(file);
 
-	if (od->is_real)
+	if ((od->is_real) && (od->is_upper))
 		return iterate_dir(od->realfile, ctx);
 
 	if (!od->cache) {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux