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
cc537af9
Commit
cc537af9
authored
Feb 10, 2004
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Fix buffer teardown on _pagebuf_lookup_pages failure
SGI Modid: xfs-linux:xfs-kern:166032a
parent
b426ad96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
fs/xfs/linux/xfs_buf.c
fs/xfs/linux/xfs_buf.c
+12
-7
No files found.
fs/xfs/linux/xfs_buf.c
View file @
cc537af9
...
@@ -779,8 +779,9 @@ pagebuf_get( /* allocate a buffer */
...
@@ -779,8 +779,9 @@ pagebuf_get( /* allocate a buffer */
/* fill in any missing pages */
/* fill in any missing pages */
error
=
_pagebuf_lookup_pages
(
pb
,
pb
->
pb_target
->
pbr_mapping
,
flags
);
error
=
_pagebuf_lookup_pages
(
pb
,
pb
->
pb_target
->
pbr_mapping
,
flags
);
if
(
unlikely
(
error
))
{
if
(
unlikely
(
error
))
{
pagebuf_free
(
pb
);
printk
(
KERN_WARNING
return
(
NULL
);
"pagebuf_get: warning, failed to lookup pages
\n
"
);
goto
no_buffer
;
}
}
/*
/*
...
@@ -801,10 +802,7 @@ pagebuf_get( /* allocate a buffer */
...
@@ -801,10 +802,7 @@ pagebuf_get( /* allocate a buffer */
* Read ahead call which is already satisfied,
* Read ahead call which is already satisfied,
* drop the buffer
* drop the buffer
*/
*/
if
(
flags
&
(
PBF_LOCK
|
PBF_TRYLOCK
))
goto
no_buffer
;
pagebuf_unlock
(
pb
);
pagebuf_rele
(
pb
);
return
NULL
;
}
else
{
}
else
{
PB_TRACE
(
pb
,
"get_read_done"
,
(
unsigned
long
)
flags
);
PB_TRACE
(
pb
,
"get_read_done"
,
(
unsigned
long
)
flags
);
/* We do not want read in the flags */
/* We do not want read in the flags */
...
@@ -813,7 +811,14 @@ pagebuf_get( /* allocate a buffer */
...
@@ -813,7 +811,14 @@ pagebuf_get( /* allocate a buffer */
}
else
{
}
else
{
PB_TRACE
(
pb
,
"get_write"
,
(
unsigned
long
)
flags
);
PB_TRACE
(
pb
,
"get_write"
,
(
unsigned
long
)
flags
);
}
}
return
(
pb
);
return
pb
;
no_buffer:
if
(
flags
&
(
PBF_LOCK
|
PBF_TRYLOCK
))
pagebuf_unlock
(
pb
);
pagebuf_rele
(
pb
);
return
NULL
;
}
}
/*
/*
...
...
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