Commit e3260688 authored by Joern Engel's avatar Joern Engel

Prevent schedule while atomic in __logfs_readdir

Apparently filldir can sleep, which forbids kmap_atomic.
Signed-off-by: default avatarJoern Engel <joern@logfs.org>
parent e07bf553
...@@ -303,12 +303,12 @@ static int __logfs_readdir(struct file *file, void *buf, filldir_t filldir) ...@@ -303,12 +303,12 @@ static int __logfs_readdir(struct file *file, void *buf, filldir_t filldir)
(filler_t *)logfs_readpage, NULL); (filler_t *)logfs_readpage, NULL);
if (IS_ERR(page)) if (IS_ERR(page))
return PTR_ERR(page); return PTR_ERR(page);
dd = kmap_atomic(page, KM_USER0); dd = kmap(page);
BUG_ON(dd->namelen == 0); BUG_ON(dd->namelen == 0);
full = filldir(buf, (char *)dd->name, be16_to_cpu(dd->namelen), full = filldir(buf, (char *)dd->name, be16_to_cpu(dd->namelen),
pos, be64_to_cpu(dd->ino), dd->type); pos, be64_to_cpu(dd->ino), dd->type);
kunmap_atomic(dd, KM_USER0); kunmap(page);
page_cache_release(page); page_cache_release(page);
if (full) if (full)
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment