Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17226
b: refs/heads/master
c: e80358a
h: refs/heads/master
v: v3
  • Loading branch information
Arnd Bergmann authored and Paul Mackerras committed Jan 9, 2006
1 parent 5fd84f4 commit 16673c1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c8ca0633e5f2bceab7b4eba4475820fd7674dece
refs/heads/master: e80358ad8606382154d97165121602dfae213e4a
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ struct inode_operations spufs_dir_inode_operations = {
.lookup = simple_lookup,
};

struct file_operations spufs_autodelete_dir_operations = {
struct file_operations spufs_context_fops = {
.open = dcache_dir_open,
.release = spufs_dir_close,
.llseek = dcache_dir_lseek,
Expand Down Expand Up @@ -301,7 +301,7 @@ spufs_create_thread(struct nameidata *nd, const char *name,
put_unused_fd(ret);
ret = PTR_ERR(filp);
} else {
filp->f_op = &spufs_autodelete_dir_operations;
filp->f_op = &spufs_context_fops;
fd_install(ret, filp);
}

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/cell/spufs/spufs.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ long spufs_run_spu(struct file *file,
struct spu_context *ctx, u32 *npc, u32 *status);
long spufs_create_thread(struct nameidata *nd, const char *name,
unsigned int flags, mode_t mode);
extern struct file_operations spufs_context_fops;

/* context management */
struct spu_context * alloc_spu_context(struct address_space *local_store);
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/platforms/cell/spufs/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ long do_spu_run(struct file *filp, __u32 __user *unpc, __u32 __user *ustatus)
if (get_user(npc, unpc) || get_user(status, ustatus))
goto out;

/* check if this file was created by spu_create */
ret = -EINVAL;
if (filp->f_vfsmnt->mnt_sb->s_magic != SPUFS_MAGIC)
if (filp->f_op != &spufs_context_fops)
goto out;

i = SPUFS_I(filp->f_dentry->d_inode);
Expand Down

0 comments on commit 16673c1

Please sign in to comment.