Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
65033afd
Commit
65033afd
authored
Apr 21, 2009
by
Andrew Morton
Committed by
james toy
Apr 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect bh refcount underflows.
Signed-off-by:
Andrew Morton
<
akpm@linux-foundation.org
>
parent
8450dc77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
fs/buffer.c
fs/buffer.c
+8
-0
include/linux/buffer_head.h
include/linux/buffer_head.h
+1
-5
No files found.
fs/buffer.c
View file @
65033afd
...
...
@@ -46,6 +46,14 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list);
#define BH_ENTRY(list) list_entry((list), struct buffer_head, b_assoc_buffers)
void
put_bh
(
struct
buffer_head
*
bh
)
{
WARN_ON
(
atomic_read
(
&
bh
->
b_count
)
<=
0
);
smp_mb__before_atomic_dec
();
atomic_dec
(
&
bh
->
b_count
);
}
EXPORT_SYMBOL
(
put_bh
);
inline
void
init_buffer
(
struct
buffer_head
*
bh
,
bh_end_io_t
*
handler
,
void
*
private
)
{
...
...
include/linux/buffer_head.h
View file @
65033afd
...
...
@@ -254,11 +254,7 @@ static inline void get_bh(struct buffer_head *bh)
atomic_inc
(
&
bh
->
b_count
);
}
static
inline
void
put_bh
(
struct
buffer_head
*
bh
)
{
smp_mb__before_atomic_dec
();
atomic_dec
(
&
bh
->
b_count
);
}
void
put_bh
(
struct
buffer_head
*
bh
);
static
inline
void
brelse
(
struct
buffer_head
*
bh
)
{
...
...
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