Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Mon, May 07, 2007 at 11:51:31PM -0500, James R. Leu wrote: > I'm not sure if my ONLY_IN_26 usage is right, but "It compiles for me" .... > <kernel-2.4-bio_put.patch attached> thanks :) see how much we care about 2.4 meanwhile... not even try to compile it ... > -- > James R. Leu > jleu at inoc.com > INOC -> http://inoc.com/ > DELIVERING UPTIME > diff -uNr drbd-0.7.24/drbd/drbd_compat_wrappers.h drbd-0.7.24-jleu/drbd/drbd_compat_wrappers.h > --- drbd-0.7.24/drbd/drbd_compat_wrappers.h 2006-10-19 06:46:05.000000000 -0500 > +++ drbd-0.7.24-jleu/drbd/drbd_compat_wrappers.h 2007-05-07 23:17:16.000000000 -0500 > @@ -5,6 +5,7 @@ > > #define __module_get __MOD_INC_USE_COUNT > #define module_put __MOD_DEC_USE_COUNT > +#define bio_put(foo) put_bh((struct buffer_head*)(foo)) this is wrong for our code, and not needed either. probably a left over of your first try to fix our mess :) > diff -uNr drbd-0.7.24/drbd/drbd_req.c drbd-0.7.24-jleu/drbd/drbd_req.c > --- drbd-0.7.24/drbd/drbd_req.c 2007-05-04 09:01:16.000000000 -0500 > +++ drbd-0.7.24-jleu/drbd/drbd_req.c 2007-05-07 23:45:42.000000000 -0500 > @@ -270,8 +270,10 @@ > > local = inc_local(mdev); +ONLY_IN_26( if (!local) { bio_put(req->private_bio); /* or we get a bio leak */ req->private_bio = NULL; } +) > NOT_IN_26( if (rw == READA) rw=READ ); > if (rw == READ || rw == READA) { > @@ -298,8 +300,10 @@ > * local io stack. > */ > local = 0; > - bio_put(req->private_bio); > - req->private_bio = NULL; > + ONLY_IN_26( > + bio_put(req->private_bio); > + req->private_bio = NULL; > + ); > dec_local(mdev); > } > } -- : Lars Ellenberg Tel +43-1-8178292-0 : : LINBIT Information Technologies GmbH Fax +43-1-8178292-82 : : Vivenotgasse 48, A-1120 Vienna/Europe http://www.linbit.com : __ please use the "List-Reply" function of your email client.