]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Don't use page_file_mapping after removing the page
authorBenjamin Coddington <bcodding@redhat.com>
Wed, 6 Feb 2019 11:09:43 +0000 (06:09 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 12 Feb 2019 20:56:28 +0000 (15:56 -0500)
commit7f33eb69e69bfc67973ca6cfd296520783bea1b2
tree51c7046fb41b83a1c224a3f6fda41107cadcc945
parent610ea1f51a24bedda894cb577ef98abb507feca9
NFS: Don't use page_file_mapping after removing the page

If nfs_page_async_flush() removes the page from the mapping, then we can't
use page_file_mapping() on it as nfs_updatepate() is wont to do when
receiving an error.  Instead, push the mapping to the stack before the page
is possibly truncated.

Fixes: 030a96597dbc ("NFS: Fix up return value on fatal errors in nfs_page_async_flush()")
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/write.c