Re: [PATCH v7 05/10] NFSD introduce asynch copy feature

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

 



On Wed, Mar 07, 2018 at 05:06:21PM -0500, Olga Kornievskaia wrote:
> On Wed, Mar 7, 2018 at 4:05 PM, J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote:
> > I don't understand yet why you need these two cases.  Anyway, I'd rather
> > you did this in the caller.  So the caller can do either:
> >
> >         spin_lock()
> >         list_del()
> >         spin_unlock()
> >         cleanup_async_copy()
> >
> > or just
> >
> >         cleanup_async_copy()
> >
> > Or define another helper for the first case if you're really doing it a
> > lot.  Just don't make me have to remember what that second argument
> > means each time I see it used.
> 
> Ok I'll fix it. It was added after I changed where copy was added to
> the list. In one case, now I needed to do all of the cleanup but the
> copy wasn't added to the list yet.

As long as you've at least initialized the list, it's OK to call
list_del() on it.  So another alternative might just be to call
list_del() in both cases.

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux