Re: [PATCH 27/41] fs: Fold fsync_buffers_list() into sync_mapping_buffers()

Christoph Hellwig
2026-03-24T05:44:51Z

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
> - get_bh(bh);
> - mapping = bh->b_assoc_map;
> - __remove_assoc_queue(bh);
> - /* Avoid race with mark_buffer_dirty_inode() which does
> - * a lockless check and we rely on seeing the dirty bit */
> - smp_mb();
> - if (buffer_dirty(bh)) {
> - list_add(&bh->b_assoc_buffers,
> - &mapping->i_private_list);
> - bh->b_assoc_map = mapping;
> - }
> - spin_unlock(lock);
> - wait_on_buffer(bh);
> - if (!buffer_uptodate(bh))
> - err = -EIO;
> - brelse(bh);
> - spin_lock(lock);
> - }
> -
> - spin_unlock(lock);
> - return err;
> -}
> -
> /*
> * Invalidate any and all dirty buffers on a given inode. We are
> * probably unmounting the fs, but that doesn't mean we have already
> --
> 2.51.0
>
>
---end quoted text---