[PATCH] shared compression workspaces limits doesnot match

DORMANTno replies

From: Rock Lee <hidden>
Date: 2012-11-01 09:30:57
Subsystem: btrfs file system, filesystems (vfs and infrastructure), the rest · Maintainers: David Sterba, Alexander Viro, Christian Brauner, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help