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
a4e92339
Commit
a4e92339
authored
Jan 31, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Avoid setting j->write_work unnecessarily
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
656f05d8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
fs/bcachefs/journal.c
fs/bcachefs/journal.c
+11
-13
No files found.
fs/bcachefs/journal.c
View file @
a4e92339
...
...
@@ -416,6 +416,7 @@ static int journal_entry_open(struct journal *j)
}
while
((
v
=
atomic64_cmpxchg
(
&
j
->
reservations
.
counter
,
old
.
v
,
new
.
v
))
!=
old
.
v
);
if
(
nr_unwritten_journal_entries
(
j
)
==
1
)
mod_delayed_work
(
j
->
wq
,
&
j
->
write_work
,
msecs_to_jiffies
(
c
->
opts
.
journal_flush_delay
));
...
...
@@ -443,19 +444,16 @@ static void journal_quiesce(struct journal *j)
static
void
journal_write_work
(
struct
work_struct
*
work
)
{
struct
journal
*
j
=
container_of
(
work
,
struct
journal
,
write_work
.
work
);
long
delta
;
spin_lock
(
&
j
->
lock
);
if
(
!
__journal_entry_is_open
(
j
->
reservations
))
goto
unlock
;
delta
=
journal_cur_buf
(
j
)
->
expires
-
jiffies
;
if
(
__journal_entry_is_open
(
j
->
reservations
))
{
long
delta
=
journal_cur_buf
(
j
)
->
expires
-
jiffies
;
if
(
delta
>
0
)
mod_delayed_work
(
j
->
wq
,
&
j
->
write_work
,
delta
);
else
__journal_entry_close
(
j
,
JOURNAL_ENTRY_CLOSED_VAL
,
true
);
unlock:
}
spin_unlock
(
&
j
->
lock
);
}
...
...
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