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
23ce7898
Commit
23ce7898
authored
Jun 17, 2003
by
Andrew Morton
Committed by
Linus Torvalds
Jun 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] JBD: implement journal->j_head locking
Implement the designed locking around journal->j_head.
parent
2d16ce3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
fs/jbd/journal.c
fs/jbd/journal.c
+3
-1
No files found.
fs/jbd/journal.c
View file @
23ce7898
...
@@ -507,6 +507,7 @@ int journal_next_log_block(journal_t *journal, unsigned long *retp)
...
@@ -507,6 +507,7 @@ int journal_next_log_block(journal_t *journal, unsigned long *retp)
{
{
unsigned
long
blocknr
;
unsigned
long
blocknr
;
spin_lock
(
&
journal
->
j_state_lock
);
J_ASSERT
(
journal
->
j_free
>
1
);
J_ASSERT
(
journal
->
j_free
>
1
);
blocknr
=
journal
->
j_head
;
blocknr
=
journal
->
j_head
;
...
@@ -514,6 +515,7 @@ int journal_next_log_block(journal_t *journal, unsigned long *retp)
...
@@ -514,6 +515,7 @@ int journal_next_log_block(journal_t *journal, unsigned long *retp)
journal
->
j_free
--
;
journal
->
j_free
--
;
if
(
journal
->
j_head
==
journal
->
j_last
)
if
(
journal
->
j_head
==
journal
->
j_last
)
journal
->
j_head
=
journal
->
j_first
;
journal
->
j_head
=
journal
->
j_first
;
spin_unlock
(
&
journal
->
j_state_lock
);
return
journal_bmap
(
journal
,
blocknr
,
retp
);
return
journal_bmap
(
journal
,
blocknr
,
retp
);
}
}
...
@@ -733,7 +735,7 @@ static void journal_fail_superblock (journal_t *journal)
...
@@ -733,7 +735,7 @@ static void journal_fail_superblock (journal_t *journal)
* subsequent use.
* subsequent use.
*/
*/
static
int
journal_reset
(
journal_t
*
journal
)
static
int
journal_reset
(
journal_t
*
journal
)
{
{
journal_superblock_t
*
sb
=
journal
->
j_superblock
;
journal_superblock_t
*
sb
=
journal
->
j_superblock
;
unsigned
int
first
,
last
;
unsigned
int
first
,
last
;
...
...
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