Commit d9699f17 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] use invalid not illegal in reiserfs

(Steven Cole)
parent 4a397dde
...@@ -376,7 +376,7 @@ static int balance_leaf (struct tree_balance * tb, ...@@ -376,7 +376,7 @@ static int balance_leaf (struct tree_balance * tb,
if ( is_direntry_le_ih (B_N_PITEM_HEAD (tbS0, item_pos))) { if ( is_direntry_le_ih (B_N_PITEM_HEAD (tbS0, item_pos))) {
RFALSE( zeros_num, RFALSE( zeros_num,
"PAP-12090: illegal parameter in case of a directory"); "PAP-12090: invalid parameter in case of a directory");
/* directory item */ /* directory item */
if ( tb->lbytes > pos_in_item ) { if ( tb->lbytes > pos_in_item ) {
/* new directory entry falls into L[0] */ /* new directory entry falls into L[0] */
...@@ -646,7 +646,7 @@ static int balance_leaf (struct tree_balance * tb, ...@@ -646,7 +646,7 @@ static int balance_leaf (struct tree_balance * tb,
int entry_count; int entry_count;
RFALSE( zeros_num, RFALSE( zeros_num,
"PAP-12145: illegal parametr in case of a directory"); "PAP-12145: invalid parameter in case of a directory");
entry_count = I_ENTRY_COUNT(B_N_PITEM_HEAD(tbS0, item_pos)); entry_count = I_ENTRY_COUNT(B_N_PITEM_HEAD(tbS0, item_pos));
if ( entry_count - tb->rbytes < pos_in_item ) if ( entry_count - tb->rbytes < pos_in_item )
/* new directory entry falls into R[0] */ /* new directory entry falls into R[0] */
......
...@@ -1847,7 +1847,7 @@ static int get_direct_parent( ...@@ -1847,7 +1847,7 @@ static int get_direct_parent(
if ( n_path_offset <= FIRST_PATH_ELEMENT_OFFSET ) { if ( n_path_offset <= FIRST_PATH_ELEMENT_OFFSET ) {
RFALSE( n_path_offset < FIRST_PATH_ELEMENT_OFFSET - 1, RFALSE( n_path_offset < FIRST_PATH_ELEMENT_OFFSET - 1,
"PAP-8260: illegal offset in the path"); "PAP-8260: invalid offset in the path");
if ( PATH_OFFSET_PBUFFER(p_s_path, FIRST_PATH_ELEMENT_OFFSET)->b_blocknr == if ( PATH_OFFSET_PBUFFER(p_s_path, FIRST_PATH_ELEMENT_OFFSET)->b_blocknr ==
SB_ROOT_BLOCK (p_s_tb->tb_sb) ) { SB_ROOT_BLOCK (p_s_tb->tb_sb) ) {
......
...@@ -311,7 +311,7 @@ inline const struct key * get_lkey ( ...@@ -311,7 +311,7 @@ inline const struct key * get_lkey (
struct buffer_head * p_s_parent; struct buffer_head * p_s_parent;
RFALSE( n_path_offset < FIRST_PATH_ELEMENT_OFFSET, RFALSE( n_path_offset < FIRST_PATH_ELEMENT_OFFSET,
"PAP-5010: illegal offset in the path"); "PAP-5010: invalid offset in the path");
/* While not higher in path than first element. */ /* While not higher in path than first element. */
while ( n_path_offset-- > FIRST_PATH_ELEMENT_OFFSET ) { while ( n_path_offset-- > FIRST_PATH_ELEMENT_OFFSET ) {
...@@ -351,7 +351,7 @@ inline const struct key * get_rkey ( ...@@ -351,7 +351,7 @@ inline const struct key * get_rkey (
struct buffer_head * p_s_parent; struct buffer_head * p_s_parent;
RFALSE( n_path_offset < FIRST_PATH_ELEMENT_OFFSET, RFALSE( n_path_offset < FIRST_PATH_ELEMENT_OFFSET,
"PAP-5030: illegal offset in the path"); "PAP-5030: invalid offset in the path");
while ( n_path_offset-- > FIRST_PATH_ELEMENT_OFFSET ) { while ( n_path_offset-- > FIRST_PATH_ELEMENT_OFFSET ) {
...@@ -393,7 +393,7 @@ static inline int key_in_buffer ( ...@@ -393,7 +393,7 @@ static inline int key_in_buffer (
RFALSE( ! p_s_key || p_s_chk_path->path_length < FIRST_PATH_ELEMENT_OFFSET || RFALSE( ! p_s_key || p_s_chk_path->path_length < FIRST_PATH_ELEMENT_OFFSET ||
p_s_chk_path->path_length > MAX_HEIGHT, p_s_chk_path->path_length > MAX_HEIGHT,
"PAP-5050: pointer to the key(%p) is NULL or illegal path length(%d)", "PAP-5050: pointer to the key(%p) is NULL or invalid path length(%d)",
p_s_key, p_s_chk_path->path_length); p_s_key, p_s_chk_path->path_length);
RFALSE( !PATH_PLAST_BUFFER(p_s_chk_path)->b_bdev, RFALSE( !PATH_PLAST_BUFFER(p_s_chk_path)->b_bdev,
"PAP-5060: device must not be NODEV"); "PAP-5060: device must not be NODEV");
...@@ -430,7 +430,7 @@ void decrement_counters_in_path ( ...@@ -430,7 +430,7 @@ void decrement_counters_in_path (
RFALSE( n_path_offset < ILLEGAL_PATH_ELEMENT_OFFSET || RFALSE( n_path_offset < ILLEGAL_PATH_ELEMENT_OFFSET ||
n_path_offset > EXTENDED_MAX_HEIGHT - 1, n_path_offset > EXTENDED_MAX_HEIGHT - 1,
"PAP-5080: illegal path offset of %d", n_path_offset); "PAP-5080: invalid path offset of %d", n_path_offset);
while ( n_path_offset > ILLEGAL_PATH_ELEMENT_OFFSET ) { while ( n_path_offset > ILLEGAL_PATH_ELEMENT_OFFSET ) {
struct buffer_head * bh; struct buffer_head * bh;
...@@ -461,7 +461,7 @@ void pathrelse_and_restore ( ...@@ -461,7 +461,7 @@ void pathrelse_and_restore (
int n_path_offset = p_s_search_path->path_length; int n_path_offset = p_s_search_path->path_length;
RFALSE( n_path_offset < ILLEGAL_PATH_ELEMENT_OFFSET, RFALSE( n_path_offset < ILLEGAL_PATH_ELEMENT_OFFSET,
"clm-4000: illegal path offset"); "clm-4000: invalid path offset");
while ( n_path_offset > ILLEGAL_PATH_ELEMENT_OFFSET ) { while ( n_path_offset > ILLEGAL_PATH_ELEMENT_OFFSET ) {
reiserfs_restore_prepared_buffer(s, PATH_OFFSET_PBUFFER(p_s_search_path, reiserfs_restore_prepared_buffer(s, PATH_OFFSET_PBUFFER(p_s_search_path,
...@@ -478,7 +478,7 @@ void pathrelse ( ...@@ -478,7 +478,7 @@ void pathrelse (
int n_path_offset = p_s_search_path->path_length; int n_path_offset = p_s_search_path->path_length;
RFALSE( n_path_offset < ILLEGAL_PATH_ELEMENT_OFFSET, RFALSE( n_path_offset < ILLEGAL_PATH_ELEMENT_OFFSET,
"PAP-5090: illegal path offset"); "PAP-5090: invalid path offset");
while ( n_path_offset > ILLEGAL_PATH_ELEMENT_OFFSET ) while ( n_path_offset > ILLEGAL_PATH_ELEMENT_OFFSET )
brelse(PATH_OFFSET_PBUFFER(p_s_search_path, n_path_offset--)); brelse(PATH_OFFSET_PBUFFER(p_s_search_path, n_path_offset--));
...@@ -1044,7 +1044,7 @@ static char prepare_for_delete_or_cut( ...@@ -1044,7 +1044,7 @@ static char prepare_for_delete_or_cut(
RFALSE( ! is_indirect_le_ih(&s_ih) || ! n_unfm_number || RFALSE( ! is_indirect_le_ih(&s_ih) || ! n_unfm_number ||
pos_in_item (p_s_path) + 1 != n_unfm_number, pos_in_item (p_s_path) + 1 != n_unfm_number,
"PAP-5240: illegal item %h " "PAP-5240: invalid item %h "
"n_unfm_number = %d *p_n_pos_in_item = %d", "n_unfm_number = %d *p_n_pos_in_item = %d",
&s_ih, n_unfm_number, pos_in_item (p_s_path)); &s_ih, n_unfm_number, pos_in_item (p_s_path));
...@@ -1065,7 +1065,7 @@ static char prepare_for_delete_or_cut( ...@@ -1065,7 +1065,7 @@ static char prepare_for_delete_or_cut(
pos_in_item (p_s_path) = (n_new_file_length + n_blk_size - le_ih_k_offset (&s_ih) ) >> p_s_sb->s_blocksize_bits; pos_in_item (p_s_path) = (n_new_file_length + n_blk_size - le_ih_k_offset (&s_ih) ) >> p_s_sb->s_blocksize_bits;
RFALSE( pos_in_item (p_s_path) > n_unfm_number, RFALSE( pos_in_item (p_s_path) > n_unfm_number,
"PAP-5250: illegal position in the item"); "PAP-5250: invalid position in the item");
/* Either convert last unformatted node of indirect item to direct item or increase /* Either convert last unformatted node of indirect item to direct item or increase
its free space. */ its free space. */
...@@ -1081,7 +1081,7 @@ static char prepare_for_delete_or_cut( ...@@ -1081,7 +1081,7 @@ static char prepare_for_delete_or_cut(
} }
RFALSE( n_unfm_number <= pos_in_item (p_s_path), RFALSE( n_unfm_number <= pos_in_item (p_s_path),
"PAP-5260: illegal position in the indirect item"); "PAP-5260: invalid position in the indirect item");
/* pointers to be cut */ /* pointers to be cut */
n_unfm_number -= pos_in_item (p_s_path); n_unfm_number -= pos_in_item (p_s_path);
...@@ -1573,7 +1573,7 @@ int reiserfs_cut_from_item (struct reiserfs_transaction_handle *th, ...@@ -1573,7 +1573,7 @@ int reiserfs_cut_from_item (struct reiserfs_transaction_handle *th,
/* go ahead and perform balancing */ /* go ahead and perform balancing */
RFALSE( c_mode == M_PASTE || c_mode == M_INSERT, "illegal mode"); RFALSE( c_mode == M_PASTE || c_mode == M_INSERT, "invalid mode");
/* Calculate number of bytes that need to be cut from the item. */ /* Calculate number of bytes that need to be cut from the item. */
if (retval2 == -1) if (retval2 == -1)
......
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