lkml.org 
[lkml]   [2007]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 8/8] consolidate generic_writepages and mpage_writepages fix
From: Miklos Szeredi <mszeredi@suse.cz>

Fix NULL pointer dereference in __mpage_writepage. This probably
doesn't matter in practice, but this is the original behavior.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
---

Index: linux/fs/mpage.c
===================================================================
--- linux.orig/fs/mpage.c 2007-03-06 17:30:09.000000000 +0100
+++ linux/fs/mpage.c 2007-03-06 17:30:33.000000000 +0100
@@ -662,7 +662,7 @@ confused:
if (bio)
bio = mpage_bio_submit(WRITE, bio);

- if (mpd->use_writepage) {
+ if (mpd->use_writepage && mapping->a_ops->writepage) {
ret = mapping->a_ops->writepage(page, wbc);
} else {
ret = -EAGAIN;
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-06 19:13    [W:0.118 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site