summaryrefslogtreecommitdiff
path: root/fs/overlayfs/readdir.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2017-07-27 22:54:06 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2017-07-27 22:54:06 +0300
commit31e8ccea3cd77c5f997ff61e3a5404653e54b2d5 (patch)
treebf2c4516d63b0fa61fd2c6cbdeba3b2df392b2c1 /fs/overlayfs/readdir.c
parent6787341a0f15cc79b9dd4f1341df2f5f3ad3bff1 (diff)
downloadlinux-31e8ccea3cd77c5f997ff61e3a5404653e54b2d5.tar.xz
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 <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/readdir.c')
-rw-r--r--fs/overlayfs/readdir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index 3d424a51cabb..a6cd7b204412 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -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);