diff options
author | David Howells <dhowells@redhat.com> | 2010-02-19 18:14:21 +0000 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-02-20 10:06:35 -0500 |
commit | 8f9941aeccc318f243ab3fa55aaa17f4c1cb33f9 (patch) | |
tree | a18890c2ace7ffde0682e29c58230ffc1fcdde15 /fs/fat/misc.c | |
parent | aeaa5ccd6421fbf9e7ded0ac67b12ea2b9fcf51e (diff) |
CacheFiles: Fix a race in cachefiles_delete_object() vs rename
cachefiles_delete_object() can race with rename. It gets the parent directory
of the object it's asked to delete, then locks it - but rename may have changed
the object's parent between the get and the completion of the lock.
However, if such a circumstance is detected, we abandon our attempt to delete
the object - since it's no longer in the index key path, it won't be seen
again by lookups of that key. The assumption is that cachefilesd may have
culled it by renaming it to the graveyard for later destruction.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fat/misc.c')
0 files changed, 0 insertions, 0 deletions