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

Christoph Hellwig <[email protected]> Mon, 23 Mar 2026 22:44:44 -0700
Newsgroups gmane.linux.kernel.aio.general,gmane.linux.file-systems,gmane.linux.block,gmane.comp.file-systems.ext4,gmane.linux.kernel.mm
Message-ID <[email protected]>
Looks good:

Reviewed-by: Christoph Hellwig <[email protected]>
> -		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---

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to [email protected].  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"[email protected]">[email protected]</a>