const: mark remaining inode_operations as const
[cascardo/linux.git] / arch / powerpc / platforms / cell / spufs / inode.c
index 706eb5c..fc1b1c4 100644 (file)
@@ -119,7 +119,7 @@ spufs_new_file(struct super_block *sb, struct dentry *dentry,
                const struct file_operations *fops, int mode,
                size_t size, struct spu_context *ctx)
 {
-       static struct inode_operations spufs_file_iops = {
+       static const struct inode_operations spufs_file_iops = {
                .setattr = spufs_setattr,
        };
        struct inode *inode;
@@ -631,10 +631,6 @@ long spufs_create(struct nameidata *nd, unsigned int flags, mode_t mode,
        if (IS_ERR(dentry))
                goto out_dir;
 
-       ret = -EEXIST;
-       if (dentry->d_inode)
-               goto out_dput;
-
        mode &= ~current_umask();
 
        if (flags & SPU_CREATE_GANG)
@@ -648,8 +644,6 @@ long spufs_create(struct nameidata *nd, unsigned int flags, mode_t mode,
                fsnotify_mkdir(nd->path.dentry->d_inode, dentry);
        return ret;
 
-out_dput:
-       dput(dentry);
 out_dir:
        mutex_unlock(&nd->path.dentry->d_inode->i_mutex);
 out:
@@ -779,7 +773,7 @@ static int
 spufs_fill_super(struct super_block *sb, void *data, int silent)
 {
        struct spufs_sb_info *info;
-       static struct super_operations s_ops = {
+       static const struct super_operations s_ops = {
                .alloc_inode = spufs_alloc_inode,
                .destroy_inode = spufs_destroy_inode,
                .statfs = simple_statfs,