Commit 8f18a158 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Paul Mackerras

[POWERPC] spufs: Refuse to load the module when not running on cell

As noticed by David Woodhouse, it's currently possible to mount
spufs on any machine, which means that it actually will get
mounted by fedora.
This refuses to load the module on platforms that have no
support for SPUs.

Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 6291ed3c
...@@ -600,6 +600,10 @@ spufs_create_root(struct super_block *sb, void *data) ...@@ -600,6 +600,10 @@ spufs_create_root(struct super_block *sb, void *data)
struct inode *inode; struct inode *inode;
int ret; int ret;
ret = -ENODEV;
if (!spu_management_ops)
goto out;
ret = -ENOMEM; ret = -ENOMEM;
inode = spufs_new_inode(sb, S_IFDIR | 0775); inode = spufs_new_inode(sb, S_IFDIR | 0775);
if (!inode) if (!inode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment