Merge branch 'cleanups/for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorChris Mason <clm@fb.com>
Thu, 22 Oct 2015 01:21:40 +0000 (18:21 -0700)
committerChris Mason <clm@fb.com>
Thu, 22 Oct 2015 01:21:40 +0000 (18:21 -0700)
12 files changed:
1  2 
fs/btrfs/check-integrity.c
fs/btrfs/compression.c
fs/btrfs/ctree.c
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/root-tree.c
fs/btrfs/transaction.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h

Simple merge
@@@ -821,30 -823,27 +823,30 @@@ again
  static void free_workspace(int type, struct list_head *workspace)
  {
        int idx = type - 1;
-       struct list_head *idle_workspace        = &comp_idle_workspace[idx];
-       spinlock_t *workspace_lock              = &comp_workspace_lock[idx];
-       atomic_t *alloc_workspace               = &comp_alloc_workspace[idx];
-       wait_queue_head_t *workspace_wait       = &comp_workspace_wait[idx];
-       int *num_workspace                      = &comp_num_workspace[idx];
-       spin_lock(workspace_lock);
-       if (*num_workspace < num_online_cpus()) {
-               list_add(workspace, idle_workspace);
-               (*num_workspace)++;
-               spin_unlock(workspace_lock);
+       struct list_head *idle_ws       = &btrfs_comp_ws[idx].idle_ws;
+       spinlock_t *ws_lock             = &btrfs_comp_ws[idx].ws_lock;
+       atomic_t *alloc_ws              = &btrfs_comp_ws[idx].alloc_ws;
+       wait_queue_head_t *ws_wait      = &btrfs_comp_ws[idx].ws_wait;
+       int *num_ws                     = &btrfs_comp_ws[idx].num_ws;
+       spin_lock(ws_lock);
+       if (*num_ws < num_online_cpus()) {
+               list_add(workspace, idle_ws);
+               (*num_ws)++;
+               spin_unlock(ws_lock);
                goto wake;
        }
-       spin_unlock(workspace_lock);
+       spin_unlock(ws_lock);
  
        btrfs_compress_op[idx]->free_workspace(workspace);
-       atomic_dec(alloc_workspace);
+       atomic_dec(alloc_ws);
  wake:
 +      /*
 +       * Make sure counter is updated before we wake up waiters.
 +       */
        smp_mb();
-       if (waitqueue_active(workspace_wait))
-               wake_up(workspace_wait);
+       if (waitqueue_active(ws_wait))
+               wake_up(ws_wait);
  }
  
  /*
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge