diff options
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 690ca7b0dcf6..6b7c7b132454 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -298,8 +298,8 @@ spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags, | |||
298 | 298 | ||
299 | d_instantiate(dentry, inode); | 299 | d_instantiate(dentry, inode); |
300 | dget(dentry); | 300 | dget(dentry); |
301 | dir->i_nlink++; | 301 | inc_nlink(dir); |
302 | dentry->d_inode->i_nlink++; | 302 | inc_nlink(dentry->d_inode); |
303 | goto out; | 303 | goto out; |
304 | 304 | ||
305 | out_free_ctx: | 305 | out_free_ctx: |
@@ -496,6 +496,8 @@ spufs_create_context(struct inode *inode, struct dentry *dentry, | |||
496 | ret = spufs_context_open(dget(dentry), mntget(mnt)); | 496 | ret = spufs_context_open(dget(dentry), mntget(mnt)); |
497 | if (ret < 0) { | 497 | if (ret < 0) { |
498 | WARN_ON(spufs_rmdir(inode, dentry)); | 498 | WARN_ON(spufs_rmdir(inode, dentry)); |
499 | if (affinity) | ||
500 | mutex_unlock(&gang->aff_mutex); | ||
499 | mutex_unlock(&inode->i_mutex); | 501 | mutex_unlock(&inode->i_mutex); |
500 | spu_forget(SPUFS_I(dentry->d_inode)->i_ctx); | 502 | spu_forget(SPUFS_I(dentry->d_inode)->i_ctx); |
501 | goto out; | 503 | goto out; |
@@ -538,8 +540,8 @@ spufs_mkgang(struct inode *dir, struct dentry *dentry, int mode) | |||
538 | inode->i_fop = &simple_dir_operations; | 540 | inode->i_fop = &simple_dir_operations; |
539 | 541 | ||
540 | d_instantiate(dentry, inode); | 542 | d_instantiate(dentry, inode); |
541 | dir->i_nlink++; | 543 | inc_nlink(dir); |
542 | dentry->d_inode->i_nlink++; | 544 | inc_nlink(dentry->d_inode); |
543 | return ret; | 545 | return ret; |
544 | 546 | ||
545 | out_iput: | 547 | out_iput: |
@@ -755,6 +757,7 @@ spufs_create_root(struct super_block *sb, void *data) | |||
755 | inode->i_op = &simple_dir_inode_operations; | 757 | inode->i_op = &simple_dir_inode_operations; |
756 | inode->i_fop = &simple_dir_operations; | 758 | inode->i_fop = &simple_dir_operations; |
757 | SPUFS_I(inode)->i_ctx = NULL; | 759 | SPUFS_I(inode)->i_ctx = NULL; |
760 | inc_nlink(inode); | ||
758 | 761 | ||
759 | ret = -EINVAL; | 762 | ret = -EINVAL; |
760 | if (!spufs_parse_options(sb, data, inode)) | 763 | if (!spufs_parse_options(sb, data, inode)) |