Prevent schedule while atomic in __logfs_readdir
authorJoern Engel <joern@logfs.org>
Wed, 17 Mar 2010 15:00:07 +0000 (16:00 +0100)
committerJoern Engel <joern@logfs.org>
Sat, 27 Mar 2010 10:19:15 +0000 (11:19 +0100)
Apparently filldir can sleep, which forbids kmap_atomic.

Signed-off-by: Joern Engel <joern@logfs.org>
fs/logfs/dir.c

index 56a8bfbb012041be7279216ff334831ea911edbe..c76b4b5c7ff6fa79aca003b3975568ad82b44dd8 100644 (file)
@@ -303,12 +303,12 @@ static int __logfs_readdir(struct file *file, void *buf, filldir_t filldir)
                                (filler_t *)logfs_readpage, NULL);
                if (IS_ERR(page))
                        return PTR_ERR(page);
-               dd = kmap_atomic(page, KM_USER0);
+               dd = kmap(page);
                BUG_ON(dd->namelen == 0);
 
                full = filldir(buf, (char *)dd->name, be16_to_cpu(dd->namelen),
                                pos, be64_to_cpu(dd->ino), dd->type);
-               kunmap_atomic(dd, KM_USER0);
+               kunmap(page);
                page_cache_release(page);
                if (full)
                        break;