X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=fs%2Foverlayfs%2Freaddir.c;h=150fdf3bc68d4c812fe45a886c724e58c56f84aa;hb=118516e2127722e46c5c029010df4e8743bc9722;hp=e8ad2c2c77dd72ef16c237e4901cd1498ca02060;hpb=8fd2ed1c01dd96396c39dfa203c54705c6b6e03b;p=linux-2.6-microblaze.git diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c index e8ad2c2c77dd..150fdf3bc68d 100644 --- a/fs/overlayfs/readdir.c +++ b/fs/overlayfs/readdir.c @@ -481,6 +481,8 @@ static int ovl_cache_update_ino(struct path *path, struct ovl_cache_entry *p) } this = lookup_one_len(p->name, dir, p->len); if (IS_ERR_OR_NULL(this) || !this->d_inode) { + /* Mark a stale entry */ + p->is_whiteout = true; if (IS_ERR(this)) { err = PTR_ERR(this); this = NULL; @@ -776,6 +778,9 @@ static int ovl_iterate(struct file *file, struct dir_context *ctx) if (err) goto out; } + } + /* ovl_cache_update_ino() sets is_whiteout on stale entry */ + if (!p->is_whiteout) { if (!dir_emit(ctx, p->name, p->len, p->ino, p->type)) break; }