yaffs-vfs-multi.c: Handle search context properly to prevent leaking
[yaffs2.git] / yaffs_vfs_multi.c
index 3044db72998fa052a08b99be8eb2509c37610ba2..19c891907e14fd521de7a974950a2d4023e3004d 100644 (file)
@@ -1832,10 +1832,8 @@ static int yaffs_iterate(struct file *f, struct dir_context *dc)
                goto out;
        }
 
-       if (!dir_emit_dots(f, dc)) {
-               yaffs_gross_unlock(dev);
-               return 0;
-       }
+       if (!dir_emit_dots(f, dc))
+               goto out;
 
        curoffs = 1;