lkml.org 
[lkml]   [2004]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][LIBFS] Move transaction file ops into libfs + cleanup (update)
James Morris <jmorris@redhat.com> wrote:
>
> On Sat, 14 Aug 2004, Francois Romieu wrote:
>
> > > +static inline void simple_transaction_set(struct file *file, size_t n)
> > > +{
> > > + struct simple_transaction_argresp *ar = file->private_data;
> > > +
> > > + BUG_ON(n > SIMPLE_TRANSACTION_LIMIT);
> > > + mb();
> > > + ar->size = n;
> > > +}
> >
> > Could you add the justification for the 'mb' (or the expected effect on the
> > api) as a comment ?
>
> This ensures that ar->size will really remain zero until ar->data is ready
> for reading.

I updated the patch to include this important detail in a comment.
Shouldn't it be an smb_mb()?
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.064 / U:1.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site