return false;
 }
 
-/*
- * Return true if the file was unhashed.
- */
-static bool
+static void
 nfsd_file_unhash_and_dispose(struct nfsd_file *nf, struct list_head *dispose)
 {
        trace_nfsd_file_unhash_and_dispose(nf);
-       if (!nfsd_file_unhash(nf))
-               return false;
-       /* keep final reference for nfsd_file_lru_dispose */
-       if (refcount_dec_not_one(&nf->nf_ref))
-               return true;
-
-       nfsd_file_lru_remove(nf);
-       list_add(&nf->nf_lru, dispose);
-       return true;
+       if (nfsd_file_unhash(nf)) {
+               /* caller must call nfsd_file_dispose_list() later */
+               nfsd_file_lru_remove(nf);
+               list_add(&nf->nf_lru, dispose);
+       }
 }
 
 static void
  * @lock: LRU list lock (unused)
  * @arg: dispose list
  *
- * Note this can deadlock with nfsd_file_cache_purge.
- *
  * Return values:
  *   %LRU_REMOVED: @item was removed from the LRU
  *   %LRU_ROTATE: @item is to be moved to the LRU tail
  *
  * Walk the LRU list and close any entries that have not been used since
  * the last scan.
- *
- * Note this can deadlock with nfsd_file_cache_purge.
  */
 static void
 nfsd_file_delayed_close(struct work_struct *work)
        goto out;
 }
 
-/*
- * Note this can deadlock with nfsd_file_lru_cb.
- */
 static void
 __nfsd_file_cache_purge(struct net *net)
 {
        struct rhashtable_iter iter;
        struct nfsd_file *nf;
        LIST_HEAD(dispose);
-       bool del;
 
        rhashtable_walk_enter(&nfsd_file_rhash_tbl, &iter);
        do {
                while (!IS_ERR_OR_NULL(nf)) {
                        if (net && nf->nf_net != net)
                                continue;
-                       del = nfsd_file_unhash_and_dispose(nf, &dispose);
-
-                       /*
-                        * Deadlock detected! Something marked this entry as
-                        * unhased, but hasn't removed it from the hash list.
-                        */
-                       WARN_ON_ONCE(!del);
-
+                       nfsd_file_unhash_and_dispose(nf, &dispose);
                        nf = rhashtable_walk_next(&iter);
                }