diff options
Diffstat (limited to 'fs/nfs/inode.c')
| -rw-r--r-- | fs/nfs/inode.c | 18 | 
1 files changed, 14 insertions, 4 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 9927913c97c2..577a36f0a510 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -75,7 +75,7 @@ nfs_fattr_to_ino_t(struct nfs_fattr *fattr)   * nfs_wait_bit_killable - helper for functions that are sleeping on bit locks   * @word: long word containing the bit lock   */ -int nfs_wait_bit_killable(void *word) +int nfs_wait_bit_killable(struct wait_bit_key *key)  {  	if (fatal_signal_pending(current))  		return -ERESTARTSYS; @@ -1002,6 +1002,15 @@ int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)  }  EXPORT_SYMBOL_GPL(nfs_revalidate_inode); +int nfs_revalidate_inode_rcu(struct nfs_server *server, struct inode *inode) +{ +	if (!(NFS_I(inode)->cache_validity & +			(NFS_INO_INVALID_ATTR|NFS_INO_INVALID_LABEL)) +			&& !nfs_attribute_cache_expired(inode)) +		return NFS_STALE(inode) ? -ESTALE : 0; +	return -ECHILD; +} +  static int nfs_invalidate_mapping(struct inode *inode, struct address_space *mapping)  {  	struct nfs_inode *nfsi = NFS_I(inode); @@ -1074,8 +1083,8 @@ int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping)  	 * the bit lock here if it looks like we're going to be doing that.  	 */  	for (;;) { -		ret = wait_on_bit(bitlock, NFS_INO_INVALIDATING, -				  nfs_wait_bit_killable, TASK_KILLABLE); +		ret = wait_on_bit_action(bitlock, NFS_INO_INVALIDATING, +					 nfs_wait_bit_killable, TASK_KILLABLE);  		if (ret)  			goto out;  		spin_lock(&inode->i_lock); @@ -1840,11 +1849,12 @@ EXPORT_SYMBOL_GPL(nfs_net_id);  static int nfs_net_init(struct net *net)  {  	nfs_clients_init(net); -	return 0; +	return nfs_fs_proc_net_init(net);  }  static void nfs_net_exit(struct net *net)  { +	nfs_fs_proc_net_exit(net);  	nfs_cleanup_cb_ident_idr(net);  }  |