GFS2: Clean up ->page_mkwrite
authorSteven Whitehouse <swhiteho@redhat.com>
Wed, 7 Sep 2011 14:12:51 +0000 (15:12 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 21 Oct 2011 11:39:44 +0000 (12:39 +0100)
commit13d921e37174e3d1042deeb303537c1d935da553
treec3d208bd4e8eaec8e0f07586f6b21f3c7cd5832b
parentccad4e147acf2a59b463f5df3cee8b43b144ce82
GFS2: Clean up ->page_mkwrite

This patch brings gfs2's ->page_mkwrite uptodate with respect to the
expectations set by the VM. Also added is a check to wait if the fs
is frozen, before we attempt to get a glock. This will only work on
the node which initiates the freeze, but thats ok since the transaction
lock will still provide the expected barrier on other nodes.

The major change here is that we return a locked page now, except when
we don't return a page at all (error cases). This removes the race
which required rechecking the page after it was returned.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Nick Piggin <npiggin@kernel.dk>
fs/gfs2/file.c