[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9a8748490801211818p6a7c48a2q580bd4aebbdcbe7e@mail.gmail.com>
Date: Tue, 22 Jan 2008 03:18:59 +0100
From: "Jesper Juhl" <jesper.juhl@...il.com>
To: "Anton Salikhmetov" <salikhmetov@...il.com>
Cc: linux-mm@...ck.org, jakob@...hought.net,
linux-kernel@...r.kernel.org, valdis.kletnieks@...edu,
riel@...hat.com, ksm@...dk, staubach@...hat.com,
torvalds@...ux-foundation.org, a.p.zijlstra@...llo.nl,
akpm@...ux-foundation.org, protasnb@...il.com, miklos@...redi.hu,
r.e.wolff@...wizard.nl, hidave.darkstar@...il.com,
hch@...radead.org
Subject: Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files
On 22/01/2008, Anton Salikhmetov <salikhmetov@...il.com> wrote:
> 2008/1/22, Jesper Juhl <jesper.juhl@...il.com>:
> > On 22/01/2008, Anton Salikhmetov <salikhmetov@...il.com> wrote:
> > > 2008/1/22, Jesper Juhl <jesper.juhl@...il.com>:
> > > > Some very pedantic nitpicking below;
> > > >
> > > > On 22/01/2008, Anton Salikhmetov <salikhmetov@...il.com> wrote:
> > ...
> > > > > + if (file && (vma->vm_flags & VM_SHARED)) {
> > > > > + if (flags & MS_ASYNC)
> > > > > + vma_wrprotect(vma);
> > > > > + if (flags & MS_SYNC) {
> > > >
> > > > "else if" ??
> > >
> > > The MS_ASYNC and MS_SYNC flags are mutually exclusive, that is why I
> > > did not use the "else-if" here. Moreover, this function itself checks
> > > that they never come together.
> > >
> >
> > I would say that them being mutually exclusive would be a reason *for*
> > using "else-if" here.
>
> This check is performed by the sys_msync() function itself in its very
> beginning.
>
> We don't need to check it later.
>
Sure, it's just that, to me, using 'else-if' makes it explicit that
the two are mutually exclusive. Using "if (...), if (...)" doesn't.
Maybe it's just me, but I feel that 'else-if' here better shows the
intention... No big deal.
--
Jesper Juhl <jesper.juhl@...il.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists