nfs_localio: duplicate nfs_close_local_fh()
nfs_close_local_fh() is called from two different places for quite different use case. It is called from nfs_uuid_put() when the nfs_uuid is being detached - possibly because the nfs server is not longer serving that filesystem. In this case there will always be an nfs_uuid and so rcu_read_lock() is not needed. It is also called when the nfs_file_localio is no longer needed. In this case there may not be an active nfs_uuid. These two can race, and handling the race properly while avoiding excessive locking will require different handling on each side. This patch prepares the way by opencoding nfs_close_local_fh() into nfs_uuid_put(), then simplifying the code there as befits the context. Fixes: 86e00412 ("nfs: cache all open LOCALIO nfsd_file(s) in client") Signed-off-by:NeilBrown <neil@brown.name> Signed-off-by:
Anna Schumaker <anna.schumaker@oracle.com>
Loading
Please register or sign in to comment