Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2d72e7101cc7fff5c1eb21bfcbba51c8002418d2
Commit:     2d72e7101cc7fff5c1eb21bfcbba51c8002418d2
Parent:     549ae0ac3d574a682e82b02e79259a65445a675b
Author:     Steven Whitehouse <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 7 10:25:59 2007 -0500
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Wed Feb 7 10:25:59 2007 -0500

    [GFS2] Unlock page on prepare_write try lock failure
    
    When the try lock of the glock failed in prepare_write we were
    incorrectly exiting this function with the page still locked.
    This was resulting in further I/O to this page hanging.
    
    Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/gfs2/ops_address.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index 9ddf975..5e9653c 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -360,8 +360,10 @@ static int gfs2_prepare_write(struct file *file, struct 
page *page,
        gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_ATIME|LM_FLAG_TRY_1CB, 
&ip->i_gh);
        error = gfs2_glock_nq_atime(&ip->i_gh);
        if (unlikely(error)) {
-               if (error == GLR_TRYFAILED)
+               if (error == GLR_TRYFAILED) {
+                       unlock_page(page);
                        error = AOP_TRUNCATED_PAGE;
+               }
                goto out_uninit;
        }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to