Re: [PATCH 11/20] xfs: use a list_head for iclog callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 20, 2019 at 9:20 AM Christoph Hellwig <hch@xxxxxx> wrote:
>
> On Mon, May 20, 2019 at 09:12:33AM -0400, Brian Foster wrote:
> > > +                           spin_unlock(&iclog->ic_callback_lock);
> > > +                           xlog_cil_process_commited(&tmp, aborted);
> >
> > s/commited/committed/ please.
>
> Ok.
>
> > > +   while ((ctx = list_first_entry_or_null(list,
> >
> > Are double braces necessary here?
>
> Without them gcc is unhappy:
>
> fs/xfs/xfs_log_cil.c: In function ‘xlog_cil_process_commited’:
> fs/xfs/xfs_log_cil.c:624:9: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
>   while (ctx = list_first_entry_or_null(list,
>

It's probably to guard against an assignment in a while / if / etc. statement.

In other words: Are you sure you didn't intend the following?

     while (ctx == list_first_entry_or_null(list,
                     struct xfs_cil_ctx, iclog_entry)) {

(I've stumbled on a bug like this before, so I figured I'd ask, just
to be certain.)


Thanks,

Bryan

> > >     /* attach all the transactions w/ busy extents to iclog */
> >
> > Any idea what this ^ comment means? ISTM it's misplaced or stale. If so,
> > we might as well toss/replace it.
>
> No idea.  We can probbaly remove it.



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux