Commit f359b74c authored by Vladimir Saveliev's avatar Vladimir Saveliev Committed by Linus Torvalds

[PATCH] reiserfs: max_key fix

This patch fixes a bug introduced by Al Viro's patch: [patch 136/174]
reiserfs endianness: clone struct reiserfs_key

The problem is MAX_KEY and MAX_IN_CORE_KEY defined in this patch do not
look equal from reiserfs comp_key's point of view.  This caused reiserfs'
sanity check to complain.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1808caff
...@@ -230,7 +230,6 @@ const struct reiserfs_key MAX_KEY = { ...@@ -230,7 +230,6 @@ const struct reiserfs_key MAX_KEY = {
__constant_cpu_to_le32(0xffffffff)},} __constant_cpu_to_le32(0xffffffff)},}
}; };
const struct in_core_key MAX_IN_CORE_KEY = {~0U, ~0U, ~0ULL>>4, 15};
/* Get delimiting key of the buffer by looking for it in the buffers in the path, starting from the bottom /* Get delimiting key of the buffer by looking for it in the buffers in the path, starting from the bottom
of the path, and going upwards. We must check the path's validity at each step. If the key is not in of the path, and going upwards. We must check the path's validity at each step. If the key is not in
......
...@@ -164,7 +164,9 @@ static int finish_unfinished (struct super_block * s) ...@@ -164,7 +164,9 @@ static int finish_unfinished (struct super_block * s)
/* compose key to look for "save" links */ /* compose key to look for "save" links */
max_cpu_key.version = KEY_FORMAT_3_5; max_cpu_key.version = KEY_FORMAT_3_5;
max_cpu_key.on_disk_key = MAX_IN_CORE_KEY; max_cpu_key.on_disk_key.k_dir_id = ~0U;
max_cpu_key.on_disk_key.k_objectid = ~0U;
set_cpu_key_k_offset (&max_cpu_key, ~0U);
max_cpu_key.key_length = 3; max_cpu_key.key_length = 3;
#ifdef CONFIG_QUOTA #ifdef CONFIG_QUOTA
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment