diff options
author | David Howells <dhowells@redhat.com> | 2018-04-04 13:41:25 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2018-04-04 13:41:25 +0100 |
commit | 27a3ee3a0471abaacf0c2ab1397b188c7b693fcd (patch) | |
tree | ee791b6c562b287637539c8c2968b3dbbdd5ce55 /mm/balloon_compaction.c | |
parent | c1515999bdf9a91a4b7c82623a068ffe770a17b9 (diff) |
afs: Use the vnode ID uniquifier in the cache key not the aux data
AFS vnodes (files) are referenced by a triplet of { volume ID, vnode ID,
uniquifier }. Currently, kafs is only using the vnode ID as the file key
in the volume fscache index and checking the uniquifier on cookie
acquisition against the contents of the auxiliary data stored in the cache.
Unfortunately, this is subject to a race in which an FS.RemoveFile or
FS.RemoveDir op is issued against the server but the local afs inode isn't
torn down and disposed off before another thread issues something like
FS.CreateFile. The latter then gets given the vnode ID that just got
removed, but with a new uniquifier and a cookie collision occurs in the
cache because the cookie is only keyed on the vnode ID whereas the inode is
keyed on the vnode ID plus the uniquifier.
Fix this by keying the cookie on the uniquifier in addition to the vnode ID
and dropping the uniquifier from the auxiliary data supplied.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'mm/balloon_compaction.c')
0 files changed, 0 insertions, 0 deletions