lkml.org 
[lkml]   [2010]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] blkio: Fix a crash during rq stats update
On Wed, Apr 21 2010, Vivek Goyal wrote:
> On Wed, Apr 21, 2010 at 04:55:14PM +0200, Jens Axboe wrote:
> > On Wed, Apr 21 2010, Vivek Goyal wrote:
> > > @@ -1001,6 +1002,10 @@ static struct cfq_group *cfq_get_cfqg(struct cfq_data *cfqd, int create)
> > > return cfqg;
> > > }
> > >
> > > +static inline void cfq_get_cfqg_ref(struct cfq_group *cfqg) {
> > > + atomic_inc(&cfqg->ref);
> > > +}
> >
> > Would be nicer as
> >
> > static inline void cfq_ref_get_cfqg(struct cfq_group *cfqg)
> > {
>
> Chagne of name, will do.
>
> > atomic_inc(&cfqg->ref);
> > return cfqg;
> > }
>
> So you want to return cfqg pointer here instead of return type being void?

Yeah of course, too much copy-paste.

> Will fix it.
>
> Ok, so in case of CFQ_GROUP_IOSCHED, return a poitner to cfqg upon getting
> the reference, otherwise NULL. Will fix it.

Exactly, thanks.

--
Jens Axboe



\
 
 \ /
  Last update: 2010-04-21 17:17    [W:0.025 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site