linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Andrei Vagin <avagin@gmail.com>
Cc: autofs@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	akpm@linux-foundation.org
Subject: Re: [PATCH] autofs: don't stuck in a loop if vfs_write returns an error
Date: Tue, 24 May 2016 09:34:24 +0800	[thread overview]
Message-ID: <1464053664.3108.21.camel@themaw.net> (raw)
In-Reply-To: <CANaxB-wWRaQYz5cku5iQ=HpA34Fzijz0UvYvFJnbCgrXHwX12A@mail.gmail.com>

On Mon, 2016-05-23 at 14:50 -0700, Andrei Vagin wrote:
> Hi Ian,
> 
> When are you going to apply this patch? We can't test linux-next without it.

I though I sent this with the last series but I can't see that I have.

I have the rest of that series to send over to Andrew which I was planning to do
after the current merge window closes (which is about now I guess).

I'll include it in that series.
Sorry for the hold up, ;)

Ian

> 
> Thanks,
> Andrew
> 
> 
> On Fri, Apr 1, 2016 at 12:37 AM, Ian Kent <raven@themaw.net> wrote:
> > On Thu, 2016-03-31 at 22:12 -0700, Andrey Vagin wrote:
> > > From: Andrey Vagin <avagin@openvz.org>
> > > 
> > > __vfs_write() returns a negative value in a error case.
> > 
> > Ha, right, I'll send this along to Andrew with my next series which
> > should be soon.
> > 
> > > 
> > > Cc: Ian Kent <raven@themaw.net>
> > > Signed-off-by: Andrey Vagin <avagin@openvz.org>
> > > ---
> > >  fs/autofs4/waitq.c | 7 ++++---
> > >  1 file changed, 4 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
> > > index 0146d91..631f155 100644
> > > --- a/fs/autofs4/waitq.c
> > > +++ b/fs/autofs4/waitq.c
> > > @@ -66,11 +66,12 @@ static int autofs4_write(struct autofs_sb_info
> > > *sbi,
> > >       set_fs(KERNEL_DS);
> > > 
> > >       mutex_lock(&sbi->pipe_mutex);
> > > -     wr = __vfs_write(file, data, bytes, &file->f_pos);
> > > -     while (bytes && wr) {
> > > +     while (bytes) {
> > > +             wr = __vfs_write(file, data, bytes, &file->f_pos);
> > > +             if (wr <= 0)
> > > +                     break;
> > >               data += wr;
> > >               bytes -= wr;
> > > -             wr = __vfs_write(file, data, bytes, &file->f_pos);
> > >       }
> > >       mutex_unlock(&sbi->pipe_mutex);
> > > 

  reply	other threads:[~2016-05-24  1:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01  5:12 Andrey Vagin
2016-04-01  7:37 ` Ian Kent
2016-05-23 21:50   ` Andrei Vagin
2016-05-24  1:34     ` Ian Kent [this message]
2016-05-30  5:52       ` Ian Kent
2016-06-09  1:23         ` Ian Kent
2016-06-09 17:27           ` Andrei Vagin
2016-06-10  8:45             ` Ian Kent
2016-06-10 19:07           ` Andrew Morton
2016-06-16  7:58             ` Ian Kent
2016-06-16  8:31 Ian Kent

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=1464053664.3108.21.camel@themaw.net \
    --to=raven@themaw.net \
    --cc=akpm@linux-foundation.org \
    --cc=autofs@vger.kernel.org \
    --cc=avagin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] autofs: don'\''t stuck in a loop if vfs_write returns an error' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).