Skip to content

Commit

Permalink
ovl: fix readdir error value
Browse files Browse the repository at this point in the history
actor's return value is taken as a bool (filled/not filled) so we need to
return the error in the context.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
  • Loading branch information
Miklos Szeredi committed Jul 27, 2017
1 parent 6787341 commit 31e8cce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/overlayfs/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ static int ovl_cache_entry_add_rb(struct ovl_readdir_data *rdd,
}

p = ovl_cache_entry_new(rdd, name, len, ino, d_type);
if (p == NULL)
if (p == NULL) {
rdd->err = -ENOMEM;
return -ENOMEM;
}

list_add_tail(&p->l_node, rdd->list);
rb_link_node(&p->node, parent, newp);
Expand Down

0 comments on commit 31e8cce

Please sign in to comment.