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
nexedi
linux
Commits
46691b42
Commit
46691b42
authored
Feb 10, 2004
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] plug a pagebuf leak
SGI Modid: xfs-linux:xfs-kern:166109a
parent
8f062df2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
fs/xfs/linux/xfs_buf.c
fs/xfs/linux/xfs_buf.c
+14
-3
No files found.
fs/xfs/linux/xfs_buf.c
View file @
46691b42
...
@@ -384,8 +384,8 @@ _pagebuf_freepages(
...
@@ -384,8 +384,8 @@ _pagebuf_freepages(
* pagebuf_free releases the specified buffer. The modification
* pagebuf_free releases the specified buffer. The modification
* state of any associated pages is left unchanged.
* state of any associated pages is left unchanged.
*/
*/
void
STATIC
void
pagebuf_free
(
__
pagebuf_free
(
page_buf_t
*
pb
)
page_buf_t
*
pb
)
{
{
pb_hash_t
*
hash
=
pb_hash
(
pb
);
pb_hash_t
*
hash
=
pb_hash
(
pb
);
...
@@ -431,6 +431,17 @@ pagebuf_free(
...
@@ -431,6 +431,17 @@ pagebuf_free(
pagebuf_deallocate
(
pb
);
pagebuf_deallocate
(
pb
);
}
}
void
pagebuf_free
(
page_buf_t
*
pb
)
{
if
(
unlikely
(
!
atomic_dec_and_test
(
&
pb
->
pb_hold
)))
{
printk
(
KERN_ERR
"XFS: freeing inuse buffer!
\n
"
);
dump_stack
();
}
else
__pagebuf_free
(
pb
);
}
/*
/*
* _pagebuf_lookup_pages
* _pagebuf_lookup_pages
*
*
...
@@ -1028,7 +1039,7 @@ pagebuf_rele(
...
@@ -1028,7 +1039,7 @@ pagebuf_rele(
}
}
if
(
do_free
)
{
if
(
do_free
)
{
pagebuf_free
(
pb
);
__
pagebuf_free
(
pb
);
}
}
}
}
}
}
...
...
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