From: Christoph Hellwig Date: Thu, 20 Mar 2025 07:52:14 +0000 (+0100) Subject: xfs: mark xfs_buf_free as might_sleep() X-Git-Tag: v6.15-rc3~40^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a1a56f541a8f634007de4bcb45aa3eaf803154a8;p=thirdparty%2Flinux.git xfs: mark xfs_buf_free as might_sleep() xfs_buf_free can call vunmap, which can sleep. The vunmap path is an unlikely one, so add might_sleep to ensure calling xfs_buf_free from atomic context gets caught more easily. Signed-off-by: Christoph Hellwig Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino --- diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 8e7f1b324b3be..1a2b3f06fa717 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -105,6 +105,7 @@ xfs_buf_free( { unsigned int size = BBTOB(bp->b_length); + might_sleep(); trace_xfs_buf_free(bp, _RET_IP_); ASSERT(list_empty(&bp->b_lru));