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
a1aed524
Commit
a1aed524
authored
Nov 26, 2002
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] use find_trylock_page in the I/O code
SGI Modid: 2.5.x-xfs:slinx:133725a
parent
a508db13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
fs/xfs/linux/xfs_aops.c
fs/xfs/linux/xfs_aops.c
+14
-18
No files found.
fs/xfs/linux/xfs_aops.c
View file @
a1aed524
...
...
@@ -135,17 +135,14 @@ probe_unmapped_page(
struct
page
*
page
;
int
ret
=
0
;
page
=
find_
get
_page
(
mapping
,
index
);
page
=
find_
trylock
_page
(
mapping
,
index
);
if
(
!
page
)
return
0
;
if
(
PageWriteback
(
page
)
||
TestSetPageLocked
(
page
))
{
page_cache_release
(
page
);
return
0
;
}
if
(
PageWriteback
(
page
))
goto
out
;
if
(
page
->
mapping
&&
PageDirty
(
page
))
{
if
(
!
page_has_buffers
(
page
))
{
ret
=
PAGE_CACHE_SIZE
;
}
else
{
if
(
page_has_buffers
(
page
))
{
struct
buffer_head
*
bh
,
*
head
;
bh
=
head
=
page_buffers
(
page
);
do
{
...
...
@@ -156,11 +153,12 @@ probe_unmapped_page(
if
(
ret
>=
pg_offset
)
break
;
}
while
((
bh
=
bh
->
b_this_page
)
!=
head
);
}
}
else
ret
=
PAGE_CACHE_SIZE
;
}
out:
unlock_page
(
page
);
page_cache_release
(
page
);
return
ret
;
}
...
...
@@ -214,13 +212,12 @@ probe_page(
{
struct
page
*
page
;
page
=
find_
get
_page
(
inode
->
i_mapping
,
index
);
page
=
find_
trylock
_page
(
inode
->
i_mapping
,
index
);
if
(
!
page
)
return
NULL
;
if
(
PageWriteback
(
page
)
||
TestSetPageLocked
(
page
))
{
page_cache_release
(
page
);
return
NULL
;
}
if
(
PageWriteback
(
page
))
goto
out
;
if
(
page
->
mapping
&&
page_has_buffers
(
page
))
{
struct
buffer_head
*
bh
,
*
head
;
...
...
@@ -230,8 +227,9 @@ probe_page(
return
page
;
}
while
((
bh
=
bh
->
b_this_page
)
!=
head
);
}
out:
unlock_page
(
page
);
page_cache_release
(
page
);
return
NULL
;
}
...
...
@@ -319,8 +317,6 @@ convert_page(
}
else
{
unlock_page
(
page
);
}
page_cache_release
(
page
);
}
/*
...
...
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