Re: [PATCH 1/1] 9pfs: avoid iterator invalidation in v9fs_mark_fids_unreclaim

2022-09-28 Thread Christian Schoenebeck
On Dienstag, 27. September 2022 21:47:02 CEST Greg Kurz wrote: > On Tue, 27 Sep 2022 19:14:33 +0200 > > Christian Schoenebeck wrote: > > On Dienstag, 27. September 2022 15:05:13 CEST Linus Heckemann wrote: > > > One more thing has occurred to me. I think the reclaiming/reopening > > > logic will

Re: [PATCH 1/1] 9pfs: avoid iterator invalidation in v9fs_mark_fids_unreclaim

2022-09-27 Thread Greg Kurz
On Tue, 27 Sep 2022 19:14:33 +0200 Christian Schoenebeck wrote: > On Dienstag, 27. September 2022 15:05:13 CEST Linus Heckemann wrote: > > Christian Schoenebeck writes: > > > Ah, you sent this fix as a separate patch on top. I actually just meant > > > that you would take my already queued patch

Re: [PATCH 1/1] 9pfs: avoid iterator invalidation in v9fs_mark_fids_unreclaim

2022-09-27 Thread Christian Schoenebeck
On Dienstag, 27. September 2022 15:05:13 CEST Linus Heckemann wrote: > Christian Schoenebeck writes: > > Ah, you sent this fix as a separate patch on top. I actually just meant > > that you would take my already queued patch as the latest version (just > > because I had made some minor changes on

Re: [PATCH 1/1] 9pfs: avoid iterator invalidation in v9fs_mark_fids_unreclaim

2022-09-27 Thread Linus Heckemann
Christian Schoenebeck writes: > Ah, you sent this fix as a separate patch on top. I actually just meant that > you would take my already queued patch as the latest version (just because I > had made some minor changes on my end) and adjust that patch further as v4. > > Anyway, there are still s

Re: [PATCH 1/1] 9pfs: avoid iterator invalidation in v9fs_mark_fids_unreclaim

2022-09-26 Thread Christian Schoenebeck
On Montag, 26. September 2022 14:42:06 CEST Linus Heckemann wrote: > Previously, the yielding in v9fs_reopen_fid and put_fid could result > in other parts of the code modifying the fid table. This would > invalidate the hash table iterator, causing misbehaviour. > > Now we ensure that we complete

[PATCH 1/1] 9pfs: avoid iterator invalidation in v9fs_mark_fids_unreclaim

2022-09-26 Thread Linus Heckemann
Previously, the yielding in v9fs_reopen_fid and put_fid could result in other parts of the code modifying the fid table. This would invalidate the hash table iterator, causing misbehaviour. Now we ensure that we complete the iteration before yielding, so that the iterator remains valid throughout