move spu_forget() into spufs_rmdir()
now that __fput() is *not* done in any callchain containing mmput(), we can do that... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
8cae6f7158
commit
67cba9fd64
1 changed files with 5 additions and 6 deletions
|
@ -186,10 +186,13 @@ static void spufs_prune_dir(struct dentry *dir)
|
||||||
static int spufs_rmdir(struct inode *parent, struct dentry *dir)
|
static int spufs_rmdir(struct inode *parent, struct dentry *dir)
|
||||||
{
|
{
|
||||||
/* remove all entries */
|
/* remove all entries */
|
||||||
|
int res;
|
||||||
spufs_prune_dir(dir);
|
spufs_prune_dir(dir);
|
||||||
d_drop(dir);
|
d_drop(dir);
|
||||||
|
res = simple_rmdir(parent, dir);
|
||||||
return simple_rmdir(parent, dir);
|
/* We have to give up the mm_struct */
|
||||||
|
spu_forget(SPUFS_I(dir->d_inode)->i_ctx);
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int spufs_fill_dir(struct dentry *dir,
|
static int spufs_fill_dir(struct dentry *dir,
|
||||||
|
@ -245,9 +248,6 @@ static int spufs_dir_close(struct inode *inode, struct file *file)
|
||||||
mutex_unlock(&parent->i_mutex);
|
mutex_unlock(&parent->i_mutex);
|
||||||
WARN_ON(ret);
|
WARN_ON(ret);
|
||||||
|
|
||||||
/* We have to give up the mm_struct */
|
|
||||||
spu_forget(ctx);
|
|
||||||
|
|
||||||
return dcache_dir_close(inode, file);
|
return dcache_dir_close(inode, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -497,7 +497,6 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
|
||||||
if (affinity)
|
if (affinity)
|
||||||
mutex_unlock(&gang->aff_mutex);
|
mutex_unlock(&gang->aff_mutex);
|
||||||
mutex_unlock(&inode->i_mutex);
|
mutex_unlock(&inode->i_mutex);
|
||||||
spu_forget(SPUFS_I(dentry->d_inode)->i_ctx);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue