* [PATCH] reiserfs fix for incorrect key comparison
@ 2002-02-05 11:49 Oleg Drokin on behalf of Hans Reiser
0 siblings, 0 replies; only message in thread
From: Oleg Drokin on behalf of Hans Reiser @ 2002-02-05 11:49 UTC (permalink / raw)
To: marcelo, linux-kernel, reiserfs-dev
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
Hello!
This is to fix certain cases where items may get its keys to be interpreted
wrong and cause reiserfs to panic, or to be inserted into the tree in
wrong order. This bug was only observed live on 2.5.3, though it is
present in 2.4, too.
Bye,
Oleg
[-- Attachment #2: pick_correct_key_version.diff --]
[-- Type: text/plain, Size: 1088 bytes --]
--- linux-2.5.3/fs/reiserfs/stree.c.orig Thu Jan 31 19:24:47 2002
+++ linux-2.5.3/fs/reiserfs/stree.c Thu Jan 31 19:26:54 2002
@@ -126,19 +126,19 @@
retval = comp_short_keys (le_key, cpu_key);
if (retval)
return retval;
- if (le_key_k_offset (cpu_key->version, le_key) < cpu_key_k_offset (cpu_key))
+ if (le_key_k_offset (le_key_version(le_key), le_key) < cpu_key_k_offset (cpu_key))
return -1;
- if (le_key_k_offset (cpu_key->version, le_key) > cpu_key_k_offset (cpu_key))
+ if (le_key_k_offset (le_key_version(le_key), le_key) > cpu_key_k_offset (cpu_key))
return 1;
if (cpu_key->key_length == 3)
return 0;
/* this part is needed only when tail conversion is in progress */
- if (le_key_k_type (cpu_key->version, le_key) < cpu_key_k_type (cpu_key))
+ if (le_key_k_type (le_key_version(le_key), le_key) < cpu_key_k_type (cpu_key))
return -1;
- if (le_key_k_type (cpu_key->version, le_key) > cpu_key_k_type (cpu_key))
+ if (le_key_k_type (le_key_version(le_key), le_key) > cpu_key_k_type (cpu_key))
return 1;
return 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-02-05 11:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-05 11:49 [PATCH] reiserfs fix for incorrect key comparison Oleg Drokin on behalf of Hans Reiser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox