]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfs: use blocking page_group_lock in add_request
authorWeston Andros Adamson <dros@primarydata.com>
Mon, 15 Sep 2014 18:14:41 +0000 (14:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 20:41:01 +0000 (13:41 -0700)
commit4a2025db17aa8646bdbc318da56e2729d6431b47
treedbf26bc81beb40c7f7790f9f8a5eb85556931445
parent28c86fda6b1d637bac19a72c5db5cce90b043b95
nfs: use blocking page_group_lock in add_request

commit bfd484a5606d6a0379a0a2f04251b1e5c1f8995c upstream.

__nfs_pageio_add_request was calling nfs_page_group_lock nonblocking, but
this can return -EAGAIN which would end up passing -EIO to the application.

There is no reason not to block in this path, so change the two calls to
do so. Also, there is no need to check the return value of
nfs_page_group_lock when nonblock=false, so remove the error handling code.

Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Reviewed-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/pagelist.c