diff mbox

shared compression workspaces limits doesnot match

Message ID CAFc7E1k2gg9uVAmZE_J07=Fyx4MojLihWc2_4thEduLnePVDxw@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rock Lee Nov. 1, 2012, 9:30 a.m. UTC
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@gmail.com>
---
 fs/btrfs/compression.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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

Patch

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);