Re: [BUG?] do_generic_direct_write

J.A. Magallon (jamagallon@able.es)
Fri, 4 Jul 2003 22:55:56 +0200


On 06.28, J.A. Magallon wrote:
>
> On 06.27, Marcelo Tosatti wrote:
> >
> > Hello,
> >
> > Here goes -pre2 with a big number of changes, including the new aic7xxx
> > driver.
> >
> > I wont accept any big changes after -pre4: I want 2.4.22 timecycle to be
> > short.
> >
>
> Correct me if I'm wrong. I found this just by chance:
>
> mm/filemap.c:
> ssize_t
> do_generic_direct_write(struct file *file,const char *buf,size_t count, loff_t *ppos)
> ...
>
> if (!file->f_flags & O_DIRECT)
> BUG();
>
> This fails to trigger the BUG() just when it should. This should be:
>
> if (!(file->f_flags & O_DIRECT))
> BUG();

Someone can confirm this / flame me , plz ?

-- 
J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.22-pre2-jam1 (gcc 3.3 (Mandrake Linux 9.2 3.3-2mdk))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/