GFS2: Adding missing unlock_page()
authorMaxim <maxim.patlasov@gmail.com>
Mon, 14 Mar 2011 13:19:21 +0000 (13:19 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 14 Mar 2011 13:19:21 +0000 (13:19 +0000)
gfs2_write_begin() calls grab_cache_page_write_begin() that returns *locked*
page. Correspondent error-handling path lacks for unlock_page() call:

> out:
>  if (error == 0)
>  return 0;
>
>  page_cache_release(page);

The whole system hangs if gfs2_unstuff_dinode() called from gfs2_write_begin()
failed for some reason.

Reported-by: Maxim <maxim.patlasov@gmail.com>
Signed-off-by: Maxim <maxim.patlasov@gmail.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/aops.c

index 4f36f8832b9b1b167321e119260da82d89b4cdf0..aad77e4f61b574a3b29bb253a01e29046c70da55 100644 (file)
@@ -695,6 +695,7 @@ out:
        if (error == 0)
                return 0;
 
+       unlock_page(page);
        page_cache_release(page);
 
        gfs2_trans_end(sdp);
This page took 0.026058 seconds and 5 git commands to generate.