]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4: Fix up mirror allocation
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sat, 19 Aug 2017 14:10:34 +0000 (10:10 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 20 Aug 2017 14:36:35 +0000 (10:36 -0400)
commite3298de900260bb2fa5ef0388bfd2818c210ddc0
treee941cf6c9d88ecbdb5a921a8a89c8ef3086efd9c
parent81e33233bb6e5b6c3449e934fdad18cd5f870194
NFSv4: Fix up mirror allocation

There are a number of callers of nfs_pageio_complete() that want to
continue using the nfs_pageio_descriptor without needing to call
nfs_pageio_init() again. Examples include nfs_pageio_resend() and
nfs_pageio_cond_complete().

The problem is that nfs_pageio_complete() also calls
nfs_pageio_cleanup_mirroring(), which frees up the array of mirrors.
This can lead to writeback errors, in the next call to
nfs_pageio_setup_mirroring().

Fix by simply moving the allocation of the mirrors to
nfs_pageio_setup_mirroring().

Link: https://bugzilla.kernel.org/show_bug.cgi?id=196709
Reported-by: JianhongYin <yin-jianhong@163.com>
Cc: stable@vger.kernel.org # 4.0+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/pagelist.c