login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
March
»
7
Re: [patch 8/8] consolidate generic_writepages and mpage_writepages fix
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Miklos Szeredi <miklos@...>
To: <akpm@...>
Cc: <linux-kernel@...>, <linux-fsdevel@...>
Subject:
Re: [patch 8/8] consolidate generic_writepages and mpage_writepages fix
Date: Wednesday, March 7, 2007 - 5:26 pm
> > From: Miklos Szeredi <mszeredi@suse.cz>
quoted text
> > > > 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; > > > > -- > > I'm inclined to leave the code as-is, as an optimisation. If it > blows up then it'd be cleaner to change the caller (mpage_writepages) > to do > > .use_writepage = (writepage != NULL), > > ?
It seems all in-tree uses of mpage_writepages define ->writepage() so it should be safe to drop this patch. Thanks, Miklos -
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[patch 8/8] consolidate generic_writepages and mpage_writepa...
, Miklos Szeredi
, (Tue Mar 6, 2:04 pm)
Re: [patch 8/8] consolidate generic_writepages and mpage_wri...
, Andrew Morton
, (Wed Mar 7, 4:46 pm)
Re: [patch 8/8] consolidate generic_writepages and mpage_wri...
, Miklos Szeredi
, (Wed Mar 7, 5:26 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Andrew Morton
Re: Linux 2.6.21-rc4
Andrew Morton
-mm merge plans for 2.6.23
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Balbir Singh
Re: [RFC][PATCH 2/7] RSS controller core
git
:
linux-netdev
:
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
David Miller
[GIT]: Networking
Andreas Henriksson
[PATCH 06/12] Remove bogus reference to tc-filters(8) from tc(8) manpage.
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
0 users
and
881 guests
online.
Syndicate