Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions fs/overlayfs/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,15 +838,14 @@ static int ovl_iterate_merged(struct file *file, struct dir_context *ctx)
struct ovl_dir_file *od = file->private_data;
struct dentry *dentry = file->f_path.dentry;
struct ovl_cache_entry *p;
int err = 0;
int err;

if (!od->cache) {
struct ovl_dir_cache *cache;

cache = ovl_cache_get(dentry);
err = PTR_ERR(cache);
if (IS_ERR(cache))
return err;
return PTR_ERR(cache);

od->cache = cache;
ovl_seek_cursor(od, ctx->pos);
Expand All @@ -869,7 +868,7 @@ static int ovl_iterate_merged(struct file *file, struct dir_context *ctx)
od->cursor = p->l_node.next;
ctx->pos++;
}
return err;
return 0;
}

static bool ovl_need_adjust_d_ino(struct file *file)
Expand Down
Loading