Fix hang caused by returning with lock held
authorCharles Manning <cdhmanning@gmail.com>
Mon, 23 Jul 2018 05:04:23 +0000 (17:04 +1200)
committerCharles Manning <cdhmanning@gmail.com>
Mon, 23 Jul 2018 05:04:23 +0000 (17:04 +1200)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
yaffs_vfs_multi.c

index 707fcb3..de3dd75 100644 (file)
@@ -1816,8 +1816,10 @@ static int yaffs_iterate(struct file *f, struct dir_context *dc)
                goto out;
        }
 
-       if (!dir_emit_dots(f, dc))
+       if (!dir_emit_dots(f, dc)) {
+               yaffs_gross_unlock(dev);
                return 0;
+       }
 
        curoffs = 1;