On 18 Apr 2017, at 16:32, Benjamin Coddington wrote: > On 18 Apr 2017, at 12:42, Trond Myklebust wrote: > >> 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. > > I can do this. It might make sense to just replace rw_mode with something > like rw_gfp_flags.. Otherwise, this looks like another argument to > nfs_pageio_init(), unless we can piggy-back on pg_ioflags. But that won't work, since we'll need something to laster figure out whether a read or write delegation stateid can be used. Maybe you were instead suggesting to move the rw_mode to the pageio_descriptor or header.. Ben -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html