All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [RFC] nilfs2: double bio_put() in nilfs_end_bio_write()
Date: Sat, 20 Jul 2013 21:40:43 +0000	[thread overview]
Message-ID: <20130720214043.GC5636@mwanda> (raw)
In-Reply-To: <20130719092603.GB22147@longonot.mountain>

On Sat, Jul 20, 2013 at 01:10:23PM +0400, Vyacheslav Dubeyko wrote:
> > diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c
> > index dc9a913..a660fd7 100644
> > --- a/fs/nilfs2/segbuf.c
> > +++ b/fs/nilfs2/segbuf.c
> > @@ -346,7 +346,8 @@ static void nilfs_end_bio_write(struct bio *bio, int err)
> > 	if (err = -EOPNOTSUPP) {
> > 		set_bit(BIO_EOPNOTSUPP, &bio->bi_flags);
> > 		bio_put(bio);
> > -		/* to be detected by submit_seg_bio() */
> > +		/* to be detected by nilfs_segbuf_submit_bio() */
> > +		return;
> 
> I think that simple return from the function is not right way. As I understand the code,
> then we increment error count in segbuf's sb_err field and signalize about completion of
> operation. So, from my viewpoint, it needs to remove the bio_put() call for the case of
> (err = -EOPNOTSUPP) instead of return from function.
> 

Do you think you could send that patch and give me a reported-by
tag?  I feel weird signing off on it when I don't really understand
this code...

regards,
dan carpenter

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>,
	linux-nilfs@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [RFC] nilfs2: double bio_put() in nilfs_end_bio_write()
Date: Sun, 21 Jul 2013 00:40:43 +0300	[thread overview]
Message-ID: <20130720214043.GC5636@mwanda> (raw)
In-Reply-To: <8D04BC36-EF1A-4ED9-86CC-50F17A0EAA11@dubeyko.com>

On Sat, Jul 20, 2013 at 01:10:23PM +0400, Vyacheslav Dubeyko wrote:
> > diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c
> > index dc9a913..a660fd7 100644
> > --- a/fs/nilfs2/segbuf.c
> > +++ b/fs/nilfs2/segbuf.c
> > @@ -346,7 +346,8 @@ static void nilfs_end_bio_write(struct bio *bio, int err)
> > 	if (err == -EOPNOTSUPP) {
> > 		set_bit(BIO_EOPNOTSUPP, &bio->bi_flags);
> > 		bio_put(bio);
> > -		/* to be detected by submit_seg_bio() */
> > +		/* to be detected by nilfs_segbuf_submit_bio() */
> > +		return;
> 
> I think that simple return from the function is not right way. As I understand the code,
> then we increment error count in segbuf's sb_err field and signalize about completion of
> operation. So, from my viewpoint, it needs to remove the bio_put() call for the case of
> (err == -EOPNOTSUPP) instead of return from function.
> 

Do you think you could send that patch and give me a reported-by
tag?  I feel weird signing off on it when I don't really understand
this code...

regards,
dan carpenter

  parent reply	other threads:[~2013-07-20 21:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19  9:26 [RFC] nilfs2: double bio_put() in nilfs_end_bio_write() Dan Carpenter
2013-07-19  9:26 ` Dan Carpenter
2013-07-20  9:10 ` Vyacheslav Dubeyko
2013-07-20  9:10   ` Vyacheslav Dubeyko
2013-07-20 21:40 ` Dan Carpenter [this message]
2013-07-20 21:40   ` Dan Carpenter
2013-07-21 12:50 ` Vyacheslav Dubeyko
2013-07-21 12:50   ` Vyacheslav Dubeyko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130720214043.GC5636@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.