.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "UNLOCK_PAGE" "" "06 October 2005" "" ""
.SH NAME
unlock_page \- unlock a locked page
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
void unlock_page (struct page * \fIpage\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIpage\fB\fR
the page
.SH "DESCRIPTION"
.PP
Unlocks the page and wakes up sleepers in \fB___wait_on_page_locked\fR\&.
Also wakes sleepers in \fBwait_on_page_writeback\fR because the wakeup
mechananism between PageLocked pages and PageWriteback pages is shared.
But that's OK - sleepers in \fBwait_on_page_writeback\fR just go back to sleep.
.PP
The first mb is necessary to safely close the critical section opened by the
\fBTestSetPageLocked\fR, the second mb is necessary to enforce ordering between
the clear_bit and the read of the waitqueue (to avoid SMP races with a
parallel \fBwait_on_page_locked\fR).
.SH "DESCRIPTION"
.PP
Unlocks the page and wakes up sleepers in \fB___wait_on_page_locked\fR\&.
Also wakes sleepers in \fBwait_on_page_writeback\fR because the wakeup
mechananism between PageLocked pages and PageWriteback pages is shared.
But that's OK - sleepers in \fBwait_on_page_writeback\fR just go back to sleep.
.PP
The first mb is necessary to safely close the critical section opened by the
\fBTestSetPageLocked\fR, the second mb is necessary to enforce ordering between
the clear_bit and the read of the waitqueue (to avoid SMP races with a
parallel \fBwait_on_page_locked\fR).