Skip to content

Commit 31e8cce

Browse files
author
Miklos Szeredi
committed
ovl: fix readdir error value
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 <[email protected]>
1 parent 6787341 commit 31e8cce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/overlayfs/readdir.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,10 @@ static int ovl_cache_entry_add_rb(struct ovl_readdir_data *rdd,
131131
}
132132

133133
p = ovl_cache_entry_new(rdd, name, len, ino, d_type);
134-
if (p == NULL)
134+
if (p == NULL) {
135+
rdd->err = -ENOMEM;
135136
return -ENOMEM;
137+
}
136138

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

0 commit comments

Comments
 (0)