mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	NFSv4: Don't discard the attributes returned by asynchronous DELEGRETURN
DELEGRETURN will always carry a reference to the inode except when the latter is being freed, so let's ensure that we always use that inode information to ensure close-to-open cache consistency, even when the DELEGRETURN call is asynchronous. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
		
							parent
							
								
									e603a4c1b5
								
							
						
					
					
						commit
						0bc2c9b4dc
					
				
					 1 changed files with 1 additions and 4 deletions
				
			
		| 
						 | 
					@ -5699,6 +5699,7 @@ static void nfs4_delegreturn_release(void *calldata)
 | 
				
			||||||
		if (data->lr.roc)
 | 
							if (data->lr.roc)
 | 
				
			||||||
			pnfs_roc_release(&data->lr.arg, &data->lr.res,
 | 
								pnfs_roc_release(&data->lr.arg, &data->lr.res,
 | 
				
			||||||
					data->res.lr_ret);
 | 
										data->res.lr_ret);
 | 
				
			||||||
 | 
							nfs_post_op_update_inode_force_wcc(inode, &data->fattr);
 | 
				
			||||||
		nfs_iput_and_deactive(inode);
 | 
							nfs_iput_and_deactive(inode);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	kfree(calldata);
 | 
						kfree(calldata);
 | 
				
			||||||
| 
						 | 
					@ -5787,10 +5788,6 @@ static int _nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, co
 | 
				
			||||||
	if (status != 0)
 | 
						if (status != 0)
 | 
				
			||||||
		goto out;
 | 
							goto out;
 | 
				
			||||||
	status = data->rpc_status;
 | 
						status = data->rpc_status;
 | 
				
			||||||
	if (status == 0)
 | 
					 | 
				
			||||||
		nfs_post_op_update_inode_force_wcc(inode, &data->fattr);
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		nfs_refresh_inode(inode, &data->fattr);
 | 
					 | 
				
			||||||
out:
 | 
					out:
 | 
				
			||||||
	rpc_put_task(task);
 | 
						rpc_put_task(task);
 | 
				
			||||||
	return status;
 | 
						return status;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue