summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_reflink.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-08-11 15:52:25 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-08-16 18:43:24 -0700
commitedc58dd0123b552453a74369bd0c8d890b497b4b (patch)
treef7150ad9ad44a311987109b39b4532e88db0c819 /fs/xfs/xfs_reflink.c
parent4529e6d7a6ab727aa85b1dd3cbfa9e82f10f730d (diff)
downloadlinux-edc58dd0123b552453a74369bd0c8d890b497b4b.tar.bz2
vfs: fix page locking deadlocks when deduping files
When dedupe wants to use the page cache to compare parts of two files for dedupe, we must be very careful to handle locking correctly. The current code doesn't do this. It must lock and unlock the page only once if the two pages are the same, since the overlapping range check doesn't catch this when blocksize < pagesize. If the pages are distinct but from the same file, we must observe page locking order and lock them in order of increasing offset to avoid clashing with writeback locking. Fixes: 876bec6f9bbfcb3 ("vfs: refactor clone/dedupe_file_range common functions") Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Bill O'Donnell <billodo@redhat.com> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'fs/xfs/xfs_reflink.c')
0 files changed, 0 insertions, 0 deletions