Skip to content

Commit a1a56f5

Browse files
Christoph Hellwigcmaiolino
authored andcommitted
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 <hch@lst.de> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Carlos Maiolino <cem@kernel.org>
1 parent b73e052 commit a1a56f5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/xfs/xfs_buf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ xfs_buf_free(
105105
{
106106
unsigned int size = BBTOB(bp->b_length);
107107

108+
might_sleep();
108109
trace_xfs_buf_free(bp, _RET_IP_);
109110

110111
ASSERT(list_empty(&bp->b_lru));

0 commit comments

Comments
 (0)