Commit:     ffda9d302267dbb7fc9bc38f6e4c1b3d61a536a9
Parent:     bc56bba8f31bd99f350a5ebfd43d50f411b620c7
Author:     Nick Piggin <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 20 13:57:54 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 20 17:10:13 2007 -0800

    [PATCH] fs: fix __block_write_full_page error case buffer submission
    Andrew noticed that unlocking the page before submitting all buffers for
    writeout could cause problems if the IO completes before we've finished
    messing around with the page buffers, and they subsequently get freed.
    Even if there were no bug, it is a good idea to bring the error case
    into line with the common case here.
    Signed-off-by: Nick Piggin <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/buffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index f99c509..e95fe4f 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1743,7 +1743,6 @@ recover:
-       unlock_page(page);
        do {
                struct buffer_head *next = bh->b_this_page;
                if (buffer_async_write(bh)) {
@@ -1753,6 +1752,7 @@ recover:
                bh = next;
        } while (bh != head);
+       unlock_page(page);
        goto done;
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

Reply via email to