From: Yu Kuai yukuai3@huawei.com
Offering: HULK hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IB5UKT
--------------------------------
Currently cookie is combined with:
csum + acc + key
However, acc doesn't exist in mainline anymore, hence if new_location is set, skip acc to keep cachefile location the same as mainline.
Signed-off-by: Yu Kuai yukuai3@huawei.com Signed-off-by: Baokun Li libaokun1@huawei.com --- fs/cachefiles/key.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/cachefiles/key.c b/fs/cachefiles/key.c index f94847a44ab5..53643600fd1b 100644 --- a/fs/cachefiles/key.c +++ b/fs/cachefiles/key.c @@ -102,7 +102,8 @@ char *cachefiles_cook_key(struct cachefiles_object *object, mark = len - 1;
if (print) { - cachefiles_cook_acc(key, *(uint16_t *) raw, &len); + if (!volume_new_location(cookie) && !data_new_location(cookie)) + cachefiles_cook_acc(key, *(uint16_t *) raw, &len); raw += 2; seg = 250; for (loop = keylen; loop > 0; loop--) {