btrfs: replace waitqueue_actvie with cond_wake_up
[sfrench/cifs-2.6.git] / fs / btrfs / compression.c
index 578181cd96b5374ad808df5d00c72684b1dbbef3..d3e447b45bf793abd7ca555af7e9e6ad40b2da2d 100644 (file)
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2008 Oracle.  All rights reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License v2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 021110-1307, USA.
  */
 
 #include <linux/kernel.h>
@@ -1003,12 +990,7 @@ static void __free_workspace(int type, struct list_head *workspace,
                btrfs_compress_op[idx]->free_workspace(workspace);
        atomic_dec(total_ws);
 wake:
-       /*
-        * Make sure counter is updated before we wake up waiters.
-        */
-       smp_mb();
-       if (waitqueue_active(ws_wait))
-               wake_up(ws_wait);
+       cond_wake_up(ws_wait);
 }
 
 static void free_workspace(int type, struct list_head *ws)