]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix an Oopsable condition in __nfs_pageio_add_request()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 25 May 2021 14:23:05 +0000 (10:23 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 26 May 2021 10:36:13 +0000 (06:36 -0400)
commit9ee1bdf27b410a77b9cb94ad60f174239bce1b36
tree9cfb4e7a5e6bca35bb48d3ff9c8b84d9e34b7e12
parent523429c18287e0dc8ccfb1a88b1c9822a3c0b20a
NFS: Fix an Oopsable condition in __nfs_pageio_add_request()

Ensure that nfs_pageio_error_cleanup() resets the mirror array contents,
so that the structure reflects the fact that it is now empty.
Also change the test in nfs_pageio_do_add_request() to be more robust by
checking whether or not the list is empty rather than relying on the
value of pg_count.

Fixes: 83640929b2ca ("nfs: add mirroring support to pgio layer")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/pagelist.c