Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a606eaf7
Commit
a606eaf7
authored
Jul 11, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jul 11, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: NULL noise in fs/reiserfs
parent
1c400de9
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
69 additions
and
69 deletions
+69
-69
fs/reiserfs/do_balan.c
fs/reiserfs/do_balan.c
+11
-11
fs/reiserfs/file.c
fs/reiserfs/file.c
+1
-1
fs/reiserfs/fix_node.c
fs/reiserfs/fix_node.c
+6
-6
fs/reiserfs/ibalance.c
fs/reiserfs/ibalance.c
+2
-2
fs/reiserfs/inode.c
fs/reiserfs/inode.c
+8
-8
fs/reiserfs/item_ops.c
fs/reiserfs/item_ops.c
+1
-1
fs/reiserfs/lbalance.c
fs/reiserfs/lbalance.c
+7
-7
fs/reiserfs/namei.c
fs/reiserfs/namei.c
+12
-12
fs/reiserfs/prints.c
fs/reiserfs/prints.c
+7
-7
fs/reiserfs/procfs.c
fs/reiserfs/procfs.c
+2
-2
fs/reiserfs/stree.c
fs/reiserfs/stree.c
+7
-7
fs/reiserfs/super.c
fs/reiserfs/super.c
+3
-3
fs/reiserfs/tail_conversion.c
fs/reiserfs/tail_conversion.c
+1
-1
include/linux/reiserfs_fs.h
include/linux/reiserfs_fs.h
+1
-1
No files found.
fs/reiserfs/do_balan.c
View file @
a606eaf7
...
...
@@ -169,8 +169,8 @@ static int balance_leaf_when_delete (struct tree_balance * tb, int flag)
if
(
PATH_H_POSITION
(
tb
->
tb_path
,
1
)
==
0
&&
1
<
B_NR_ITEMS
(
tb
->
FR
[
0
])
)
replace_key
(
tb
,
tb
->
CFL
[
0
],
tb
->
lkey
[
0
],
tb
->
FR
[
0
],
1
);
leaf_move_items
(
LEAF_FROM_S_TO_L
,
tb
,
n
,
-
1
,
0
);
leaf_move_items
(
LEAF_FROM_R_TO_L
,
tb
,
B_NR_ITEMS
(
tb
->
R
[
0
]),
-
1
,
0
);
leaf_move_items
(
LEAF_FROM_S_TO_L
,
tb
,
n
,
-
1
,
NULL
);
leaf_move_items
(
LEAF_FROM_R_TO_L
,
tb
,
B_NR_ITEMS
(
tb
->
R
[
0
]),
-
1
,
NULL
);
reiserfs_invalidate_buffer
(
tb
,
tbS0
);
reiserfs_invalidate_buffer
(
tb
,
tb
->
R
[
0
]);
...
...
@@ -178,8 +178,8 @@ static int balance_leaf_when_delete (struct tree_balance * tb, int flag)
return
0
;
}
/* all contents of all the 3 buffers will be in R[0] */
leaf_move_items
(
LEAF_FROM_S_TO_R
,
tb
,
n
,
-
1
,
0
);
leaf_move_items
(
LEAF_FROM_L_TO_R
,
tb
,
B_NR_ITEMS
(
tb
->
L
[
0
]),
-
1
,
0
);
leaf_move_items
(
LEAF_FROM_S_TO_R
,
tb
,
n
,
-
1
,
NULL
);
leaf_move_items
(
LEAF_FROM_L_TO_R
,
tb
,
B_NR_ITEMS
(
tb
->
L
[
0
]),
-
1
,
NULL
);
/* right_delimiting_key is correct in R[0] */
replace_key
(
tb
,
tb
->
CFR
[
0
],
tb
->
rkey
[
0
],
tb
->
R
[
0
],
0
);
...
...
@@ -854,7 +854,7 @@ static int balance_leaf (struct tree_balance * tb,
/* Insert part of the item into S_new[i] before 0-th item */
bi
.
tb
=
tb
;
bi
.
bi_bh
=
S_new
[
i
];
bi
.
bi_parent
=
0
;
bi
.
bi_parent
=
NULL
;
bi
.
bi_position
=
0
;
if
(
(
old_len
-
sbytes
[
i
])
>
zeros_num
)
{
...
...
@@ -882,7 +882,7 @@ static int balance_leaf (struct tree_balance * tb,
/* Insert new item into S_new[i] */
bi
.
tb
=
tb
;
bi
.
bi_bh
=
S_new
[
i
];
bi
.
bi_parent
=
0
;
bi
.
bi_parent
=
NULL
;
bi
.
bi_position
=
0
;
leaf_insert_into_buf
(
&
bi
,
item_pos
-
n
+
snum
[
i
]
-
1
,
ih
,
body
,
zeros_num
);
...
...
@@ -927,7 +927,7 @@ static int balance_leaf (struct tree_balance * tb,
/* Paste given directory entry to directory item */
bi
.
tb
=
tb
;
bi
.
bi_bh
=
S_new
[
i
];
bi
.
bi_parent
=
0
;
bi
.
bi_parent
=
NULL
;
bi
.
bi_position
=
0
;
leaf_paste_in_buffer
(
&
bi
,
0
,
pos_in_item
-
entry_count
+
sbytes
[
i
]
-
1
,
tb
->
insert_size
[
0
],
body
,
zeros_num
);
...
...
@@ -965,7 +965,7 @@ static int balance_leaf (struct tree_balance * tb,
/* Append part of body into S_new[0] */
bi
.
tb
=
tb
;
bi
.
bi_bh
=
S_new
[
i
];
bi
.
bi_parent
=
0
;
bi
.
bi_parent
=
NULL
;
bi
.
bi_position
=
0
;
if
(
n_rem
>
zeros_num
)
{
...
...
@@ -1021,7 +1021,7 @@ static int balance_leaf (struct tree_balance * tb,
/* paste into item */
bi
.
tb
=
tb
;
bi
.
bi_bh
=
S_new
[
i
];
bi
.
bi_parent
=
0
;
bi
.
bi_parent
=
NULL
;
bi
.
bi_position
=
0
;
leaf_paste_in_buffer
(
&
bi
,
item_pos
-
n
+
snum
[
i
],
pos_in_item
,
tb
->
insert_size
[
0
],
body
,
zeros_num
);
...
...
@@ -1196,11 +1196,11 @@ struct buffer_head * get_FEB (struct tree_balance * tb)
bi
.
tb
=
tb
;
bi
.
bi_bh
=
first_b
=
tb
->
FEB
[
i
];
bi
.
bi_parent
=
0
;
bi
.
bi_parent
=
NULL
;
bi
.
bi_position
=
0
;
make_empty_node
(
&
bi
);
set_buffer_uptodate
(
first_b
);
tb
->
FEB
[
i
]
=
0
;
tb
->
FEB
[
i
]
=
NULL
;
tb
->
used
[
i
]
=
first_b
;
return
(
first_b
);
...
...
fs/reiserfs/file.c
View file @
a606eaf7
...
...
@@ -832,7 +832,7 @@ int reiserfs_prepare_file_region_for_write(
struct
item_head
*
ih
=
NULL
;
// pointer to item head that we are going to deal with
struct
buffer_head
*
itembuf
=
NULL
;
// Buffer head that contains items that we are going to deal with
INITIALIZE_PATH
(
path
);
// path to item, that we are going to deal with.
__u32
*
item
=
0
;
// pointer to item we are going to deal with
__u32
*
item
=
NULL
;
// pointer to item we are going to deal with
int
item_pos
=-
1
;
/* Position in indirect item */
...
...
fs/reiserfs/fix_node.c
View file @
a606eaf7
...
...
@@ -2445,12 +2445,12 @@ int fix_nodes (int n_op_mode,
reiserfs_restore_prepared_buffer
(
p_s_tb
->
tb_sb
,
p_s_tb
->
CFR
[
i
]);
}
brelse
(
p_s_tb
->
L
[
i
]);
p_s_tb
->
L
[
i
]
=
0
;
brelse
(
p_s_tb
->
R
[
i
]);
p_s_tb
->
R
[
i
]
=
0
;
brelse
(
p_s_tb
->
FL
[
i
]);
p_s_tb
->
FL
[
i
]
=
0
;
brelse
(
p_s_tb
->
FR
[
i
]);
p_s_tb
->
FR
[
i
]
=
0
;
brelse
(
p_s_tb
->
CFL
[
i
]);
p_s_tb
->
CFL
[
i
]
=
0
;
brelse
(
p_s_tb
->
CFR
[
i
]);
p_s_tb
->
CFR
[
i
]
=
0
;
brelse
(
p_s_tb
->
L
[
i
]);
p_s_tb
->
L
[
i
]
=
NULL
;
brelse
(
p_s_tb
->
R
[
i
]);
p_s_tb
->
R
[
i
]
=
NULL
;
brelse
(
p_s_tb
->
FL
[
i
]);
p_s_tb
->
FL
[
i
]
=
NULL
;
brelse
(
p_s_tb
->
FR
[
i
]);
p_s_tb
->
FR
[
i
]
=
NULL
;
brelse
(
p_s_tb
->
CFL
[
i
]);
p_s_tb
->
CFL
[
i
]
=
NULL
;
brelse
(
p_s_tb
->
CFR
[
i
]);
p_s_tb
->
CFR
[
i
]
=
NULL
;
}
if
(
wait_tb_buffers_run
)
{
...
...
fs/reiserfs/ibalance.c
View file @
a606eaf7
...
...
@@ -922,7 +922,7 @@ int balance_internal (struct tree_balance * tb, /* tree_balance structure */
if
(
tb
->
blknum
[
h
]
!=
1
)
reiserfs_panic
(
0
,
"balance_internal: One new node required for creating the new root"
);
reiserfs_panic
(
NULL
,
"balance_internal: One new node required for creating the new root"
);
/* S[h] = empty buffer from the list FEB. */
tbSh
=
get_FEB
(
tb
);
blkh
=
B_BLK_HEAD
(
tbSh
);
...
...
@@ -964,7 +964,7 @@ int balance_internal (struct tree_balance * tb, /* tree_balance structure */
dest_bi
.
tb
=
tb
;
dest_bi
.
bi_bh
=
S_new
;
dest_bi
.
bi_parent
=
0
;
dest_bi
.
bi_parent
=
NULL
;
dest_bi
.
bi_position
=
0
;
src_bi
.
tb
=
tb
;
src_bi
.
bi_bh
=
tbSh
;
...
...
fs/reiserfs/inode.c
View file @
a606eaf7
...
...
@@ -556,7 +556,7 @@ int reiserfs_get_block (struct inode * inode, sector_t block,
INITIALIZE_PATH
(
path
);
int
pos_in_item
;
struct
cpu_key
key
;
struct
buffer_head
*
bh
,
*
unbh
=
0
;
struct
buffer_head
*
bh
,
*
unbh
=
NULL
;
struct
item_head
*
ih
,
tmp_ih
;
__u32
*
item
;
int
done
;
...
...
@@ -1394,7 +1394,7 @@ struct inode * reiserfs_iget (struct super_block * s, const struct cpu_key * key
if
(
comp_short_keys
(
INODE_PKEY
(
inode
),
key
)
||
is_bad_inode
(
inode
))
{
/* either due to i/o error or a stale NFS handle */
iput
(
inode
);
inode
=
0
;
inode
=
NULL
;
}
return
inode
;
}
...
...
@@ -1558,13 +1558,13 @@ static int reiserfs_new_directory (struct reiserfs_transaction_handle *th,
old type (ITEM_VERSION_1). Do not set key (second arg is 0), it
is done by reiserfs_new_inode */
if
(
old_format_only
(
sb
))
{
make_le_item_head
(
ih
,
0
,
KEY_FORMAT_3_5
,
DOT_OFFSET
,
TYPE_DIRENTRY
,
EMPTY_DIR_SIZE_V1
,
2
);
make_le_item_head
(
ih
,
NULL
,
KEY_FORMAT_3_5
,
DOT_OFFSET
,
TYPE_DIRENTRY
,
EMPTY_DIR_SIZE_V1
,
2
);
make_empty_dir_item_v1
(
body
,
ih
->
ih_key
.
k_dir_id
,
ih
->
ih_key
.
k_objectid
,
INODE_PKEY
(
dir
)
->
k_dir_id
,
INODE_PKEY
(
dir
)
->
k_objectid
);
}
else
{
make_le_item_head
(
ih
,
0
,
KEY_FORMAT_3_5
,
DOT_OFFSET
,
TYPE_DIRENTRY
,
EMPTY_DIR_SIZE
,
2
);
make_le_item_head
(
ih
,
NULL
,
KEY_FORMAT_3_5
,
DOT_OFFSET
,
TYPE_DIRENTRY
,
EMPTY_DIR_SIZE
,
2
);
make_empty_dir_item
(
body
,
ih
->
ih_key
.
k_dir_id
,
ih
->
ih_key
.
k_objectid
,
INODE_PKEY
(
dir
)
->
k_dir_id
,
...
...
@@ -1606,7 +1606,7 @@ static int reiserfs_new_symlink (struct reiserfs_transaction_handle *th,
le32_to_cpu
(
ih
->
ih_key
.
k_objectid
),
1
,
TYPE_DIRECT
,
3
/*key length*/
);
make_le_item_head
(
ih
,
0
,
KEY_FORMAT_3_5
,
1
,
TYPE_DIRECT
,
item_len
,
0
/*free_space*/
);
make_le_item_head
(
ih
,
NULL
,
KEY_FORMAT_3_5
,
1
,
TYPE_DIRECT
,
item_len
,
0
/*free_space*/
);
/* look for place in the tree for new item */
retval
=
search_item
(
sb
,
&
key
,
path
);
...
...
@@ -1701,7 +1701,7 @@ int reiserfs_new_inode (struct reiserfs_transaction_handle *th,
REISERFS_I
(
inode
)
->
i_prealloc_block
=
0
;
REISERFS_I
(
inode
)
->
i_prealloc_count
=
0
;
REISERFS_I
(
inode
)
->
i_trans_id
=
0
;
REISERFS_I
(
inode
)
->
i_jl
=
0
;
REISERFS_I
(
inode
)
->
i_jl
=
NULL
;
REISERFS_I
(
inode
)
->
i_attrs
=
REISERFS_I
(
dir
)
->
i_attrs
&
REISERFS_INHERIT_MASK
;
sd_attrs_to_i_attrs
(
REISERFS_I
(
inode
)
->
i_attrs
,
inode
);
...
...
@@ -1710,9 +1710,9 @@ int reiserfs_new_inode (struct reiserfs_transaction_handle *th,
init_rwsem
(
&
REISERFS_I
(
inode
)
->
xattr_sem
);
if
(
old_format_only
(
sb
))
make_le_item_head
(
&
ih
,
0
,
KEY_FORMAT_3_5
,
SD_OFFSET
,
TYPE_STAT_DATA
,
SD_V1_SIZE
,
MAX_US_INT
);
make_le_item_head
(
&
ih
,
NULL
,
KEY_FORMAT_3_5
,
SD_OFFSET
,
TYPE_STAT_DATA
,
SD_V1_SIZE
,
MAX_US_INT
);
else
make_le_item_head
(
&
ih
,
0
,
KEY_FORMAT_3_6
,
SD_OFFSET
,
TYPE_STAT_DATA
,
SD_SIZE
,
MAX_US_INT
);
make_le_item_head
(
&
ih
,
NULL
,
KEY_FORMAT_3_6
,
SD_OFFSET
,
TYPE_STAT_DATA
,
SD_SIZE
,
MAX_US_INT
);
/* key to search for correct place for new stat data */
_make_cpu_key
(
&
key
,
KEY_FORMAT_3_6
,
le32_to_cpu
(
ih
.
ih_key
.
k_dir_id
),
...
...
fs/reiserfs/item_ops.c
View file @
a606eaf7
...
...
@@ -549,7 +549,7 @@ static int direntry_create_vi (struct virtual_node * vn,
if
(
l
+
IH_SIZE
!=
vi
->
vi_item_len
+
((
is_affected
&&
(
vn
->
vn_mode
==
M_PASTE
||
vn
->
vn_mode
==
M_CUT
))
?
insert_size
:
0
)
)
{
reiserfs_panic
(
0
,
"vs-8025: set_entry_sizes: (mode==%c, insert_size==%d), invalid length of directory item"
,
reiserfs_panic
(
NULL
,
"vs-8025: set_entry_sizes: (mode==%c, insert_size==%d), invalid length of directory item"
,
vn
->
vn_mode
,
insert_size
);
}
}
...
...
fs/reiserfs/lbalance.c
View file @
a606eaf7
...
...
@@ -49,7 +49,7 @@ static void leaf_copy_dir_entries (struct buffer_info * dest_bi, struct buffer_h
deh_location
(
&
(
deh
[
from
+
copy_count
-
1
]));
}
else
{
copy_records_len
=
0
;
records
=
0
;
records
=
NULL
;
}
/* when copy last to first, dest buffer can contain 0 items */
...
...
@@ -145,7 +145,7 @@ static int leaf_copy_boundary_item (struct buffer_info * dest_bi, struct buffer_
else
{
if
(
bytes_or_entries
==
ih_item_len
(
ih
)
&&
is_indirect_le_ih
(
ih
))
if
(
get_ih_free_space
(
ih
))
reiserfs_panic
(
0
,
"vs-10020: leaf_copy_boundary_item: "
reiserfs_panic
(
NULL
,
"vs-10020: leaf_copy_boundary_item: "
"last unformatted node must be filled entirely (%h)"
,
ih
);
}
...
...
@@ -552,13 +552,13 @@ static void leaf_define_dest_src_infos (int shift_mode, struct tree_balance * tb
src_bi
->
bi_position
=
PATH_H_B_ITEM_ORDER
(
tb
->
tb_path
,
0
);
dest_bi
->
tb
=
tb
;
dest_bi
->
bi_bh
=
Snew
;
dest_bi
->
bi_parent
=
0
;
dest_bi
->
bi_parent
=
NULL
;
dest_bi
->
bi_position
=
0
;
*
first_last
=
LAST_TO_FIRST
;
break
;
default:
reiserfs_panic
(
0
,
"vs-10250: leaf_define_dest_src_infos: shift type is unknown (%d)"
,
shift_mode
);
reiserfs_panic
(
NULL
,
"vs-10250: leaf_define_dest_src_infos: shift type is unknown (%d)"
,
shift_mode
);
}
RFALSE
(
src_bi
->
bi_bh
==
0
||
dest_bi
->
bi_bh
==
0
,
"vs-10260: mode==%d, source (%p) or dest (%p) buffer is initialized incorrectly"
,
...
...
@@ -595,7 +595,7 @@ int leaf_shift_left (struct tree_balance * tb, int shift_num, int shift_bytes)
int
i
;
/* move shift_num (and shift_bytes bytes) items from S[0] to left neighbor L[0] */
i
=
leaf_move_items
(
LEAF_FROM_S_TO_L
,
tb
,
shift_num
,
shift_bytes
,
0
);
i
=
leaf_move_items
(
LEAF_FROM_S_TO_L
,
tb
,
shift_num
,
shift_bytes
,
NULL
);
if
(
shift_num
)
{
if
(
B_NR_ITEMS
(
S0
)
==
0
)
{
/* number of items in S[0] == 0 */
...
...
@@ -648,7 +648,7 @@ int leaf_shift_right(
int
ret_value
;
/* move shift_num (and shift_bytes) items from S[0] to right neighbor R[0] */
ret_value
=
leaf_move_items
(
LEAF_FROM_S_TO_R
,
tb
,
shift_num
,
shift_bytes
,
0
);
ret_value
=
leaf_move_items
(
LEAF_FROM_S_TO_R
,
tb
,
shift_num
,
shift_bytes
,
NULL
);
/* replace rkey in CFR[0] by the 0-th key from R[0] */
if
(
shift_num
)
{
...
...
@@ -829,7 +829,7 @@ void leaf_paste_in_buffer (struct buffer_info * bi, int affected_item_num,
#ifdef CONFIG_REISERFS_CHECK
if
(
zeros_number
>
paste_size
)
{
print_cur_tb
(
"10177"
);
reiserfs_panic
(
0
,
"vs-10177: leaf_paste_in_buffer: ero number == %d, paste_size == %d"
,
reiserfs_panic
(
NULL
,
"vs-10177: leaf_paste_in_buffer: ero number == %d, paste_size == %d"
,
zeros_number
,
paste_size
);
}
#endif
/* CONFIG_REISERFS_CHECK */
...
...
fs/reiserfs/namei.c
View file @
a606eaf7
...
...
@@ -331,7 +331,7 @@ static struct dentry * reiserfs_lookup (struct inode * dir, struct dentry * dent
return
ERR_PTR
(
-
ENAMETOOLONG
);
reiserfs_write_lock
(
dir
->
i_sb
);
de
.
de_gen_number_bit_string
=
0
;
de
.
de_gen_number_bit_string
=
NULL
;
retval
=
reiserfs_find_entry
(
dir
,
dentry
->
d_name
.
name
,
dentry
->
d_name
.
len
,
&
path_to_entry
,
&
de
);
pathrelse
(
&
path_to_entry
);
if
(
retval
==
NAME_FOUND
)
{
...
...
@@ -384,7 +384,7 @@ struct dentry *reiserfs_get_parent(struct dentry *child)
if
(
dir
->
i_nlink
==
0
)
{
return
ERR_PTR
(
-
ENOENT
);
}
de
.
de_gen_number_bit_string
=
0
;
de
.
de_gen_number_bit_string
=
NULL
;
reiserfs_write_lock
(
dir
->
i_sb
);
retval
=
reiserfs_find_entry
(
dir
,
".."
,
2
,
&
path_to_entry
,
&
de
);
...
...
@@ -607,7 +607,7 @@ static int reiserfs_create (struct inode * dir, struct dentry *dentry, int mode,
reiserfs_write_lock_xattrs
(
dir
->
i_sb
);
journal_begin
(
&
th
,
dir
->
i_sb
,
jbegin_count
)
;
retval
=
reiserfs_new_inode
(
&
th
,
dir
,
mode
,
0
,
0
/*i_size*/
,
dentry
,
inode
);
retval
=
reiserfs_new_inode
(
&
th
,
dir
,
mode
,
NULL
,
0
/*i_size*/
,
dentry
,
inode
);
if
(
locked
)
reiserfs_write_unlock_xattrs
(
dir
->
i_sb
);
...
...
@@ -668,7 +668,7 @@ static int reiserfs_mknod (struct inode * dir, struct dentry *dentry, int mode,
journal_begin
(
&
th
,
dir
->
i_sb
,
jbegin_count
)
;
retval
=
reiserfs_new_inode
(
&
th
,
dir
,
mode
,
0
,
0
/*i_size*/
,
dentry
,
inode
);
retval
=
reiserfs_new_inode
(
&
th
,
dir
,
mode
,
NULL
,
0
/*i_size*/
,
dentry
,
inode
);
if
(
locked
)
reiserfs_write_unlock_xattrs
(
dir
->
i_sb
);
...
...
@@ -737,7 +737,7 @@ static int reiserfs_mkdir (struct inode * dir, struct dentry *dentry, int mode)
*/
INC_DIR_INODE_NLINK
(
dir
)
retval
=
reiserfs_new_inode
(
&
th
,
dir
,
mode
,
0
/*symlink*/
,
retval
=
reiserfs_new_inode
(
&
th
,
dir
,
mode
,
NULL
/*symlink*/
,
old_format_only
(
dir
->
i_sb
)
?
EMPTY_DIR_SIZE_V1
:
EMPTY_DIR_SIZE
,
dentry
,
inode
);
...
...
@@ -805,7 +805,7 @@ static int reiserfs_rmdir (struct inode * dir, struct dentry *dentry)
reiserfs_write_lock
(
dir
->
i_sb
);
journal_begin
(
&
th
,
dir
->
i_sb
,
jbegin_count
)
;
de
.
de_gen_number_bit_string
=
0
;
de
.
de_gen_number_bit_string
=
NULL
;
if
(
(
retval
=
reiserfs_find_entry
(
dir
,
dentry
->
d_name
.
name
,
dentry
->
d_name
.
len
,
&
path
,
&
de
))
==
NAME_NOT_FOUND
)
{
retval
=
-
ENOENT
;
goto
end_rmdir
;
...
...
@@ -886,7 +886,7 @@ static int reiserfs_unlink (struct inode * dir, struct dentry *dentry)
reiserfs_write_lock
(
dir
->
i_sb
);
journal_begin
(
&
th
,
dir
->
i_sb
,
jbegin_count
)
;
de
.
de_gen_number_bit_string
=
0
;
de
.
de_gen_number_bit_string
=
NULL
;
if
(
(
retval
=
reiserfs_find_entry
(
dir
,
dentry
->
d_name
.
name
,
dentry
->
d_name
.
len
,
&
path
,
&
de
))
==
NAME_NOT_FOUND
)
{
retval
=
-
ENOENT
;
goto
end_unlink
;
...
...
@@ -1093,13 +1093,13 @@ static int entry_points_to_object (const char * name, int len, struct reiserfs_d
if
(
inode
)
{
if
(
!
de_visible
(
de
->
de_deh
+
de
->
de_entry_num
))
reiserfs_panic
(
0
,
"vs-7042: entry_points_to_object: entry must be visible"
);
reiserfs_panic
(
NULL
,
"vs-7042: entry_points_to_object: entry must be visible"
);
return
(
de
->
de_objectid
==
inode
->
i_ino
)
?
1
:
0
;
}
/* this must be added hidden entry */
if
(
de_visible
(
de
->
de_deh
+
de
->
de_entry_num
))
reiserfs_panic
(
0
,
"vs-7043: entry_points_to_object: entry must be visible"
);
reiserfs_panic
(
NULL
,
"vs-7043: entry_points_to_object: entry must be visible"
);
return
1
;
}
...
...
@@ -1149,7 +1149,7 @@ static int reiserfs_rename (struct inode * old_dir, struct dentry *old_dentry,
// make sure, that oldname still exists and points to an object we
// are going to rename
old_de
.
de_gen_number_bit_string
=
0
;
old_de
.
de_gen_number_bit_string
=
NULL
;
reiserfs_write_lock
(
old_dir
->
i_sb
);
retval
=
reiserfs_find_entry
(
old_dir
,
old_dentry
->
d_name
.
name
,
old_dentry
->
d_name
.
len
,
&
old_entry_path
,
&
old_de
);
...
...
@@ -1180,7 +1180,7 @@ static int reiserfs_rename (struct inode * old_dir, struct dentry *old_dentry,
/* directory is renamed, its parent directory will be changed,
** so find ".." entry
*/
dot_dot_de
.
de_gen_number_bit_string
=
0
;
dot_dot_de
.
de_gen_number_bit_string
=
NULL
;
retval
=
reiserfs_find_entry
(
old_inode
,
".."
,
2
,
&
dot_dot_entry_path
,
&
dot_dot_de
);
pathrelse
(
&
dot_dot_entry_path
);
if
(
retval
!=
NAME_FOUND
)
{
...
...
@@ -1232,7 +1232,7 @@ static int reiserfs_rename (struct inode * old_dir, struct dentry *old_dentry,
reiserfs_prepare_for_journal
(
old_inode
->
i_sb
,
old_de
.
de_bh
,
1
)
;
// look for new name by reiserfs_find_entry
new_de
.
de_gen_number_bit_string
=
0
;
new_de
.
de_gen_number_bit_string
=
NULL
;
retval
=
reiserfs_find_entry
(
new_dir
,
new_dentry
->
d_name
.
name
,
new_dentry
->
d_name
.
len
,
&
new_entry_path
,
&
new_de
);
// reiserfs_add_entry should not return IO_ERROR, because it is called with essentially same parameters from
...
...
fs/reiserfs/prints.c
View file @
a606eaf7
...
...
@@ -631,8 +631,8 @@ void store_print_tb (struct tree_balance * tb)
tbSh
=
PATH_H_PBUFFER
(
tb
->
tb_path
,
h
);
tbFh
=
PATH_H_PPARENT
(
tb
->
tb_path
,
h
);
}
else
{
tbSh
=
0
;
tbFh
=
0
;
tbSh
=
NULL
;
tbFh
=
NULL
;
}
sprintf
(
print_tb_buf
+
strlen
(
print_tb_buf
),
"* %d * %3lld(%2d) * %3lld(%2d) * %3lld(%2d) * %5lld * %5lld * %5lld * %5lld * %5lld *
\n
"
,
...
...
@@ -695,10 +695,10 @@ static void check_leaf_block_head (struct buffer_head * bh)
blkh
=
B_BLK_HEAD
(
bh
);
nr
=
blkh_nr_item
(
blkh
);
if
(
nr
>
(
bh
->
b_size
-
BLKH_SIZE
)
/
IH_SIZE
)
reiserfs_panic
(
0
,
"vs-6010: check_leaf_block_head: invalid item number %z"
,
bh
);
reiserfs_panic
(
NULL
,
"vs-6010: check_leaf_block_head: invalid item number %z"
,
bh
);
if
(
blkh_free_space
(
blkh
)
>
bh
->
b_size
-
BLKH_SIZE
-
IH_SIZE
*
nr
)
reiserfs_panic
(
0
,
"vs-6020: check_leaf_block_head: invalid free space %z"
,
bh
);
reiserfs_panic
(
NULL
,
"vs-6020: check_leaf_block_head: invalid free space %z"
,
bh
);
}
...
...
@@ -708,14 +708,14 @@ static void check_internal_block_head (struct buffer_head * bh)
blkh
=
B_BLK_HEAD
(
bh
);
if
(
!
(
B_LEVEL
(
bh
)
>
DISK_LEAF_NODE_LEVEL
&&
B_LEVEL
(
bh
)
<=
MAX_HEIGHT
))
reiserfs_panic
(
0
,
"vs-6025: check_internal_block_head: invalid level %z"
,
bh
);
reiserfs_panic
(
NULL
,
"vs-6025: check_internal_block_head: invalid level %z"
,
bh
);
if
(
B_NR_ITEMS
(
bh
)
>
(
bh
->
b_size
-
BLKH_SIZE
)
/
IH_SIZE
)
reiserfs_panic
(
0
,
"vs-6030: check_internal_block_head: invalid item number %z"
,
bh
);
reiserfs_panic
(
NULL
,
"vs-6030: check_internal_block_head: invalid item number %z"
,
bh
);
if
(
B_FREE_SPACE
(
bh
)
!=
bh
->
b_size
-
BLKH_SIZE
-
KEY_SIZE
*
B_NR_ITEMS
(
bh
)
-
DC_SIZE
*
(
B_NR_ITEMS
(
bh
)
+
1
))
reiserfs_panic
(
0
,
"vs-6040: check_internal_block_head: invalid free space %z"
,
bh
);
reiserfs_panic
(
NULL
,
"vs-6040: check_internal_block_head: invalid free space %z"
,
bh
);
}
...
...
fs/reiserfs/procfs.c
View file @
a606eaf7
...
...
@@ -591,7 +591,7 @@ void reiserfs_proc_unregister_global( const char *name )
int
reiserfs_proc_info_global_init
(
void
)
{
if
(
proc_info_root
==
NULL
)
{
proc_info_root
=
proc_mkdir
(
proc_info_root_name
,
0
);
proc_info_root
=
proc_mkdir
(
proc_info_root_name
,
NULL
);
if
(
proc_info_root
)
{
proc_info_root
->
owner
=
THIS_MODULE
;
}
else
{
...
...
@@ -608,7 +608,7 @@ int reiserfs_proc_info_global_done( void )
{
if
(
proc_info_root
!=
NULL
)
{
proc_info_root
=
NULL
;
remove_proc_entry
(
proc_info_root_name
,
0
);
remove_proc_entry
(
proc_info_root_name
,
NULL
);
}
return
0
;
}
...
...
fs/reiserfs/stree.c
View file @
a606eaf7
...
...
@@ -1306,7 +1306,7 @@ int reiserfs_delete_item (struct reiserfs_transaction_handle *th,
copy_item_head
(
&
s_ih
,
PATH_PITEM_HEAD
(
p_s_path
));
s_del_balance
.
insert_size
[
0
]
=
n_del_size
;
n_ret_value
=
fix_nodes
(
M_DELETE
,
&
s_del_balance
,
NULL
,
0
);
n_ret_value
=
fix_nodes
(
M_DELETE
,
&
s_del_balance
,
NULL
,
NULL
);
if
(
n_ret_value
!=
REPEAT_SEARCH
)
break
;
...
...
@@ -1446,14 +1446,14 @@ void reiserfs_delete_solid_item (struct reiserfs_transaction_handle *th,
}
quota_cut_bytes
=
ih_item_len
(
PATH_PITEM_HEAD
(
&
path
))
;
retval
=
fix_nodes
(
M_DELETE
,
&
tb
,
NULL
,
0
);
retval
=
fix_nodes
(
M_DELETE
,
&
tb
,
NULL
,
NULL
);
if
(
retval
==
REPEAT_SEARCH
)
{
PROC_INFO_INC
(
th
->
t_super
,
delete_solid_item_restarted
);
continue
;
}
if
(
retval
==
CARRY_ON
)
{
do_balance
(
&
tb
,
0
,
0
,
M_DELETE
);
do_balance
(
&
tb
,
NULL
,
NULL
,
M_DELETE
);
if
(
inode
)
{
/* Should we count quota for item? (we don't count quotas for save-links) */
#ifdef REISERQUOTA_DEBUG
reiserfs_debug
(
th
->
t_super
,
"reiserquota delete_solid_item(): freeing %u id=%u type=%c"
,
quota_cut_bytes
,
inode
->
i_uid
,
key2type
(
key
));
...
...
@@ -1587,7 +1587,7 @@ static void indirect_to_direct_roll_back (struct reiserfs_transaction_handle *th
"vs-5616: appended bytes found"
);
PATH_LAST_POSITION
(
path
)
--
;
removed
=
reiserfs_delete_item
(
th
,
path
,
&
tail_key
,
inode
,
0
/*unbh not needed*/
);
removed
=
reiserfs_delete_item
(
th
,
path
,
&
tail_key
,
inode
,
NULL
/*unbh not needed*/
);
RFALSE
(
removed
<=
0
||
removed
>
tail_len
,
"vs-5617: there was tail %d bytes, removed item length %d bytes"
,
tail_len
,
removed
);
...
...
@@ -1677,7 +1677,7 @@ int reiserfs_cut_from_item (struct reiserfs_transaction_handle *th,
s_cut_balance
.
insert_size
[
0
]
=
n_cut_size
;
n_ret_value
=
fix_nodes
(
c_mode
,
&
s_cut_balance
,
NULL
,
0
);
n_ret_value
=
fix_nodes
(
c_mode
,
&
s_cut_balance
,
NULL
,
NULL
);
if
(
n_ret_value
!=
REPEAT_SEARCH
)
break
;
...
...
@@ -1935,7 +1935,7 @@ static void check_research_for_paste (struct path * path,
if
(
le_ih_k_offset
(
found_ih
)
+
op_bytes_number
(
found_ih
,
get_last_bh
(
path
)
->
b_size
)
!=
cpu_key_k_offset
(
p_s_key
)
||
op_bytes_number
(
found_ih
,
get_last_bh
(
path
)
->
b_size
)
!=
pos_in_item
(
path
))
reiserfs_panic
(
0
,
"PAP-5720: check_research_for_paste: "
reiserfs_panic
(
NULL
,
"PAP-5720: check_research_for_paste: "
"found direct item %h or position (%d) does not match to key %K"
,
found_ih
,
pos_in_item
(
path
),
p_s_key
);
}
...
...
@@ -1943,7 +1943,7 @@ static void check_research_for_paste (struct path * path,
if
(
le_ih_k_offset
(
found_ih
)
+
op_bytes_number
(
found_ih
,
get_last_bh
(
path
)
->
b_size
)
!=
cpu_key_k_offset
(
p_s_key
)
||
I_UNFM_NUM
(
found_ih
)
!=
pos_in_item
(
path
)
||
get_ih_free_space
(
found_ih
)
!=
0
)
reiserfs_panic
(
0
,
"PAP-5730: check_research_for_paste: "
reiserfs_panic
(
NULL
,
"PAP-5730: check_research_for_paste: "
"found indirect item (%h) or position (%d) does not match to key (%K)"
,
found_ih
,
pos_in_item
(
path
),
p_s_key
);
}
...
...
fs/reiserfs/super.c
View file @
a606eaf7
...
...
@@ -734,7 +734,7 @@ static int reiserfs_parse_options (struct super_block * s, char * options, /* st
if
(
c
==
'r'
)
{
char
*
p
;
p
=
0
;
p
=
NULL
;
/* "resize=NNN" */
*
blocks
=
simple_strtoul
(
arg
,
&
p
,
0
);
if
(
*
p
!=
'\0'
)
{
...
...
@@ -745,7 +745,7 @@ static int reiserfs_parse_options (struct super_block * s, char * options, /* st
}
if
(
c
==
'c'
)
{
char
*
p
=
0
;
char
*
p
=
NULL
;
unsigned
long
val
=
simple_strtoul
(
arg
,
&
p
,
0
);
/* commit=NNN (time in seconds) */
if
(
*
p
!=
'\0'
||
val
>=
(
unsigned
int
)
-
1
)
{
...
...
@@ -755,7 +755,7 @@ static int reiserfs_parse_options (struct super_block * s, char * options, /* st
}
if
(
c
==
'w'
)
{
char
*
p
=
0
;
char
*
p
=
NULL
;
int
val
=
simple_strtoul
(
arg
,
&
p
,
0
);
if
(
*
p
!=
'\0'
)
{
...
...
fs/reiserfs/tail_conversion.c
View file @
a606eaf7
...
...
@@ -223,7 +223,7 @@ int indirect2direct (struct reiserfs_transaction_handle *th,
/* Set direct item header to insert. */
make_le_item_head
(
&
s_ih
,
0
,
get_inode_item_key_version
(
p_s_inode
),
pos1
+
1
,
make_le_item_head
(
&
s_ih
,
NULL
,
get_inode_item_key_version
(
p_s_inode
),
pos1
+
1
,
TYPE_DIRECT
,
round_tail_len
,
0xffff
/*ih_free_space*/
);
/* we want a pointer to the first byte of the tail in the page.
...
...
include/linux/reiserfs_fs.h
View file @
a606eaf7
...
...
@@ -81,7 +81,7 @@ void reiserfs_warning (struct super_block *s, const char * fmt, ...);
/** always check a condition and panic if it's false. */
#define RASSERT( cond, format, args... ) \
if( !( cond ) ) \
reiserfs_panic(
0
, "reiserfs[%i]: assertion " #cond " failed at " \
reiserfs_panic(
NULL
, "reiserfs[%i]: assertion " #cond " failed at " \
__FILE__ ":%i:%s: " format "\n", \
in_interrupt() ? -1 : current -> pid, __LINE__ , __FUNCTION__ , ##args )
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment