Merge tag 'io_uring-5.11-2021-01-24' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / fs / cifs / dfs_cache.c
index 6ad6ba5..0fdb0de 100644 (file)
@@ -1260,7 +1260,8 @@ void dfs_cache_del_vol(const char *fullpath)
        vi = find_vol(fullpath);
        spin_unlock(&vol_list_lock);
 
-       kref_put(&vi->refcnt, vol_release);
+       if (!IS_ERR(vi))
+               kref_put(&vi->refcnt, vol_release);
 }
 
 /**