]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: mmap lock needs to be inside freeze protection
authorDave Chinner <dchinner@redhat.com>
Wed, 3 Jun 2015 23:18:18 +0000 (09:18 +1000)
committerDan Duval <dan.duval@oracle.com>
Wed, 12 Oct 2016 13:25:03 +0000 (09:25 -0400)
commit932770a41664c8a418c2dbc94572b684483d00a3
tree0d05758059d7427771301022882df01e2afc6dfe
parent2c79ecc45b3ae87de1cb426fe393e3a748d3db6b
xfs: mmap lock needs to be inside freeze protection

Orabug: 22913653

Lock ordering for the new mmap lock needs to be:

mmap_sem
  sb_start_pagefault
    i_mmap_lock
      page lock
        <fault processsing>

Right now xfs_vm_page_mkwrite gets this the wrong way around,
While technically it cannot deadlock due to the current freeze
ordering, it's still a landmine that might explode if we change
anything in future. Hence we need to nest the locks correctly.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
(cherry picked from commit ec56b1f1fdc69599963574ce94cc5693d535dd64)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
fs/xfs/xfs_file.c