Hi Ben, On Tue, 2017-04-18 at 11:40 -0400, Benjamin Coddington wrote: > Prevent a deadlock that can occur if we wait on allocations > that try to write back our pages. > > Signed-off-by: Benjamin Coddington <bcodding@xxxxxxxxxx> > --- > fs/nfs/pagelist.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c > index 19eaae0dee51..fa2924ce5a78 100644 > --- a/fs/nfs/pagelist.c > +++ b/fs/nfs/pagelist.c > @@ -668,6 +668,7 @@ void nfs_pageio_init(struct nfs_pageio_descriptor > *desc, > { > struct nfs_pgio_mirror *new; > int i; > + gfp_t gfp_flags = GFP_KERNEL; > > desc->pg_moreio = 0; > desc->pg_inode = inode; > @@ -687,8 +688,10 @@ void nfs_pageio_init(struct > nfs_pageio_descriptor *desc, > if (pg_ops->pg_get_mirror_count) { > /* until we have a request, we don't have an lseg > and no > * idea how many mirrors there will be */ > + if (desc->pg_rw_ops->rw_mode == FMODE_WRITE) Can we rather replace this with a new field in struct nfs_pageio_descriptor? I want to get rid of pg_rw_ops->rw_mode; it's something that slipped through the cracks. Also, please put this patch before the other so that it can be easily propagated as a stable patch. Thanks! Trond -- Trond Myklebust Linux NFS client maintainer, PrimaryData trond.myklebust@xxxxxxxxxxxxxxx ��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥