Skip to content

xfs: fix a couple of potential deadlocks

Dave Chinner linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xfs: setup VFS i_rwsem lockdep state correctlyfs/xfs/xfs_iops.c+8 -04 replies
2/2xfs: xfs_reflink_convert_cow() memory allocation deadlockfs/xfs/xfs_aops.c fs/xfs/xfs_buf.c fs/xfs/xfs_linux.h+12 -16 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAllison HendersonBrian FosterDarrick J. Wong
1/2R-b R-b R-b
2/2R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/2] xfs: fix a couple of potential deadlocks

Hi folks,

These are a couple of small fixes for lockdep enabled kernels. The first changes the initialisation of the i_rwsem lockdep state in the XFS code instead of in unlock_new_inode() to avoid lockdep re-initialising the lock state after it can be found in the cache and may have other processes waiting on the lock.

The second is adding the correct memory allocation context to xfs_reflink_convert_cow() as it gets called in the IO path where we hold pages locked for IO and so we can't recurse back into memory reclaim.

Cheers,

Dave.