Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180710
b: refs/heads/master
c: 8f9941a
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and Al Viro committed Feb 20, 2010
1 parent 9106116 commit 17fc6aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: aeaa5ccd6421fbf9e7ded0ac67b12ea2b9fcf51e
refs/heads/master: 8f9941aeccc318f243ab3fa55aaa17f4c1cb33f9
12 changes: 11 additions & 1 deletion trunk/fs/cachefiles/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,17 @@ int cachefiles_delete_object(struct cachefiles_cache *cache,
dir = dget_parent(object->dentry);

mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
ret = cachefiles_bury_object(cache, dir, object->dentry);

/* we need to check that our parent is _still_ our parent - it may have
* been renamed */
if (dir == object->dentry->d_parent) {
ret = cachefiles_bury_object(cache, dir, object->dentry);
} else {
/* it got moved, presumably by cachefilesd culling it, so it's
* no longer in the key path and we can ignore it */
mutex_unlock(&dir->d_inode->i_mutex);
ret = 0;
}

dput(dir);
_leave(" = %d", ret);
Expand Down

0 comments on commit 17fc6aa

Please sign in to comment.