Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=efdc31319d43050a5742fb690b1a4beb68092a94
Commit:     efdc31319d43050a5742fb690b1a4beb68092a94
Parent:     cfa76f024f7c9e65169425804e5b32e71f66d0ee
Author:     Nick Piggin <[EMAIL PROTECTED]>
AuthorDate: Sun Oct 21 06:57:41 2007 +0200
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Oct 21 08:54:05 2007 -0700

    nobh: nobh_write_end fix
    
    This path mustn't have been tested :( I did attempt to exercise it
    by injecting failures here, but I suspect PageMappedToDisk may have
    been getting in the way. Will need more of a look, although I think
    nobh mode is OK for an -rc1 (it shouldn't eat anyone's data).
    
    Commit 03158cd7eb3374843de68421142ca5900df845d9 ("fs: restore nobh")
    introcduced a NULL deref.  Spotted by the Coverity checker.
    
    Signed-off-by: Nick Piggin <[EMAIL PROTECTED]>
    Cc: Badari Pulavarty <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/buffer.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index 76403b1..7249e01 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2563,7 +2563,7 @@ int nobh_write_end(struct file *file, struct 
address_space *mapping,
                        struct page *page, void *fsdata)
 {
        struct inode *inode = page->mapping->host;
-       struct buffer_head *head = NULL;
+       struct buffer_head *head = fsdata;
        struct buffer_head *bh;
 
        if (!PageMappedToDisk(page)) {
@@ -2584,7 +2584,6 @@ int nobh_write_end(struct file *file, struct 
address_space *mapping,
        unlock_page(page);
        page_cache_release(page);
 
-       head = fsdata;
        while (head) {
                bh = head;
                head = head->b_this_page;
-
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