mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	NFS: Clear NFS_INO_REVAL_PAGECACHE when we update the file size
In nfs_update_inode(), if the change attribute is seen to change on the server, then we set NFS_INO_REVAL_PAGECACHE in order to make sure that we check the file size. However, if we also update the file size in the same function, we don't need to check it again. So make sure that we clear the NFS_INO_REVAL_PAGECACHE that was set earlier. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
		
							parent
							
								
									18dd78c427
								
							
						
					
					
						commit
						f2467b6f64
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1601,6 +1601,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
 | 
			
		|||
			if ((nfsi->npages == 0) || new_isize > cur_isize) {
 | 
			
		||||
				i_size_write(inode, new_isize);
 | 
			
		||||
				invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA;
 | 
			
		||||
				invalid &= ~NFS_INO_REVAL_PAGECACHE;
 | 
			
		||||
			}
 | 
			
		||||
			dprintk("NFS: isize change on server for file %s/%ld "
 | 
			
		||||
					"(%Ld to %Ld)\n",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue