[PATCH] shared compression workspaces limits doesnot match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In function find_workspace, it's allowed to alloc cpus + 1 workspaces at most,
but in function free_workspace, it will freed the workspace if there
exists more then cpus' workspaces.

The two limits doesn't match. I thought the original itention is
allowed to alloc
cpus compression workspaces at most.

Signed-off-by: Rock Lee <GeekerRockLee@xxxxxxxxx>
---
 fs/btrfs/compression.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index c6467aa..eef1811 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -779,7 +779,7 @@ again:
  return workspace;

  }
- if (atomic_read(alloc_workspace) > cpus) {
+ if (atomic_read(alloc_workspace) >= cpus) {
  DEFINE_WAIT(wait);

  spin_unlock(workspace_lock);
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux