patch-2.4.10 linux/fs/reiserfs/lbalance.c
Next file: linux/fs/reiserfs/namei.c
Previous file: linux/fs/reiserfs/journal.c
Back to the patch index
Back to the overall index
- Lines: 59
- Date:
Sat Sep 8 12:05:32 2001
- Orig file:
v2.4.9/linux/fs/reiserfs/lbalance.c
- Orig date:
Mon Jan 15 15:31:19 2001
diff -u --recursive --new-file v2.4.9/linux/fs/reiserfs/lbalance.c linux/fs/reiserfs/lbalance.c
@@ -2,20 +2,12 @@
* Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
*/
-#ifdef __KERNEL__
-
#include <linux/config.h>
#include <asm/uaccess.h>
#include <linux/string.h>
#include <linux/sched.h>
#include <linux/reiserfs_fs.h>
-#else
-
-#include "nokernel.h"
-
-#endif
-
/* these are used in do_balance.c */
/* leaf_move_items
@@ -66,13 +58,8 @@
/* if there are no items in dest or the first/last item in dest is not item of the same directory */
if ( (item_num_in_dest == - 1) ||
-#ifdef REISERFS_FSCK
- (last_first == FIRST_TO_LAST && are_items_mergeable (B_N_PITEM_HEAD (dest, item_num_in_dest), ih, dest->b_size) == 0) ||
- (last_first == LAST_TO_FIRST && are_items_mergeable (ih, B_N_PITEM_HEAD (dest, item_num_in_dest), dest->b_size) == 0)) {
-#else
(last_first == FIRST_TO_LAST && le_key_k_offset (ih_version (ih), &(ih->ih_key)) == DOT_OFFSET) ||
(last_first == LAST_TO_FIRST && comp_short_le_keys/*COMP_SHORT_KEYS*/ (&ih->ih_key, B_N_PKEY (dest, item_num_in_dest)))) {
-#endif
/* create new item in dest */
struct item_head new_ih;
@@ -135,11 +122,7 @@
that we copy, so we return */
ih = B_N_PITEM_HEAD (src, 0);
dih = B_N_PITEM_HEAD (dest, dest_nr_item - 1);
-#ifdef REISERFS_FSCK
- if (!dest_nr_item || (are_items_mergeable (dih, ih, src->b_size) == 0))
-#else
if (!dest_nr_item || (!op_is_left_mergeable (&(ih->ih_key), src->b_size)))
-#endif
/* there is nothing to merge */
return 0;
@@ -202,11 +185,7 @@
ih = B_N_PITEM_HEAD (src, src_nr_item - 1);
dih = B_N_PITEM_HEAD (dest, 0);
-#ifdef REISERFS_FSCK
- if (!dest_nr_item || are_items_mergeable (ih, dih, src->b_size) == 0)
-#else
if (!dest_nr_item || !op_is_left_mergeable (&(dih->ih_key), src->b_size))
-#endif
return 0;
if ( is_direntry_le_ih (ih)) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)