Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57370
b: refs/heads/master
c: 87873c8
h: refs/heads/master
v: v3
  • Loading branch information
Sebastian Siewior authored and Paul Mackerras committed Jun 7, 2007
1 parent 9fa1dd8 commit 90cca78
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 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: 5e1e9ba690a2e2135a8f997242f9c46d2b8ac033
refs/heads/master: 87873c86802ba7ff9d9550d06459a6e99d72c5eb
17 changes: 15 additions & 2 deletions trunk/arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir)
static int spufs_fill_dir(struct dentry *dir, struct tree_descr *files,
int mode, struct spu_context *ctx)
{
struct dentry *dentry;
struct dentry *dentry, *tmp;
int ret;

while (files->name && files->name[0]) {
Expand All @@ -193,7 +193,20 @@ static int spufs_fill_dir(struct dentry *dir, struct tree_descr *files,
}
return 0;
out:
spufs_prune_dir(dir);
/*
* remove all children from dir. dir->inode is not set so don't
* just simply use spufs_prune_dir() and panic afterwards :)
* dput() looks like it will do the right thing:
* - dec parent's ref counter
* - remove child from parent's child list
* - free child's inode if possible
* - free child
*/
list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_u.d_child) {
dput(dentry);
}

shrink_dcache_parent(dir);
return ret;
}

Expand Down

0 comments on commit 90cca78

Please sign in to comment.