mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	pNFS/files: Ensure pNFS allocation modes are consistent with nfsiod
Ensure that pNFS file commit allocations in rpciod/nfsiod callbacks can fail in low memory mode, so that the threads don't block and loop forever. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
		
							parent
							
								
									3e5f151e94
								
							
						
					
					
						commit
						a245832aaa
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -1075,7 +1075,7 @@ filelayout_setup_ds_info(struct pnfs_ds_commit_info *fl_cinfo,
 | 
				
			||||||
	unsigned int size = (fl->stripe_type == STRIPE_SPARSE) ?
 | 
						unsigned int size = (fl->stripe_type == STRIPE_SPARSE) ?
 | 
				
			||||||
		fl->dsaddr->ds_num : fl->dsaddr->stripe_count;
 | 
							fl->dsaddr->ds_num : fl->dsaddr->stripe_count;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	new = pnfs_alloc_commit_array(size, GFP_NOIO);
 | 
						new = pnfs_alloc_commit_array(size, nfs_io_gfp_mask());
 | 
				
			||||||
	if (new) {
 | 
						if (new) {
 | 
				
			||||||
		spin_lock(&inode->i_lock);
 | 
							spin_lock(&inode->i_lock);
 | 
				
			||||||
		array = pnfs_add_commit_array(fl_cinfo, new, lseg);
 | 
							array = pnfs_add_commit_array(fl_cinfo, new, lseg);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue