]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/cell/spufs/coredump.c
Merge branch 'linus' into x86/signal
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / cell / spufs / coredump.c
index 0c6a96b82b2db9d22bfcd49c0e5df08a182e15f4..af116aadba105674617cb97e514996797501dc5c 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <linux/elf.h>
 #include <linux/file.h>
+#include <linux/fdtable.h>
 #include <linux/fs.h>
 #include <linux/list.h>
 #include <linux/module.h>
@@ -133,8 +134,6 @@ static struct spu_context *coredump_next_context(int *fd)
                if (ctx->flags & SPU_CREATE_NOSCHED)
                        continue;
 
-               /* start searching the next fd next time we're called */
-               (*fd)++;
                break;
        }
 
@@ -157,6 +156,9 @@ int spufs_coredump_extra_notes_size(void)
                        break;
 
                size += rc;
+
+               /* start searching the next fd next time */
+               fd++;
        }
 
        return size;
@@ -239,6 +241,9 @@ int spufs_coredump_extra_notes_write(struct file *file, loff_t *foffset)
                }
 
                spu_release_saved(ctx);
+
+               /* start searching the next fd next time */
+               fd++;
        }
 
        return 0;