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
60e8e519
Commit
60e8e519
authored
Feb 22, 2002
by
Dave Kleikamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a corruption problem in the jfs dir table
parent
edf3c7a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
fs/jfs/jfs_dtree.c
fs/jfs/jfs_dtree.c
+22
-0
No files found.
fs/jfs/jfs_dtree.c
View file @
60e8e519
...
@@ -1910,6 +1910,22 @@ static int dtSplitRoot(tid_t tid,
...
@@ -1910,6 +1910,22 @@ static int dtSplitRoot(tid_t tid,
rp
->
header
.
freecnt
=
sp
->
header
.
freecnt
+
rp
->
header
.
maxslot
-
n
;
rp
->
header
.
freecnt
=
sp
->
header
.
freecnt
+
rp
->
header
.
maxslot
-
n
;
/*
* Update directory index table for entries now in right page
*/
if
((
rp
->
header
.
flag
&
BT_LEAF
)
&&
DO_INDEX
(
ip
))
{
metapage_t
*
mp
=
0
;
ldtentry_t
*
ldtentry
;
stbl
=
DT_GETSTBL
(
rp
);
for
(
n
=
0
;
n
<
rp
->
header
.
nextindex
;
n
++
)
{
ldtentry
=
(
ldtentry_t
*
)
&
rp
->
slot
[
stbl
[
n
]];
modify_index
(
tid
,
ip
,
le32_to_cpu
(
ldtentry
->
index
),
rbn
,
n
,
&
mp
);
}
if
(
mp
)
release_metapage
(
mp
);
}
/*
/*
* Update directory index table for entries now in right page
* Update directory index table for entries now in right page
*/
*/
...
@@ -2924,6 +2940,12 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
...
@@ -2924,6 +2940,12 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
filp
->
f_pos
=
-
1
;
filp
->
f_pos
=
-
1
;
return
0
;
return
0
;
}
}
if
(
p
->
header
.
flag
&
BT_INTERNAL
)
{
jERROR
(
1
,(
"jfs_readdir: bad index table
\n
"
));
DT_PUTPAGE
(
mp
);
filp
->
f_pos
=
-
1
;
return
0
;
}
}
else
{
}
else
{
if
(
dir_index
==
0
)
{
if
(
dir_index
==
0
)
{
/*
/*
...
...
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