summaryrefslogtreecommitdiff
path: root/fs/orangefs/orangefs-bufmap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-09 12:45:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-09 12:45:47 -0700
commit8ea4a5d84e6c44b3508599fe114ea806e63985a4 (patch)
tree48c9edc5923f170aceea7dc142cd2f857ffa297e /fs/orangefs/orangefs-bufmap.c
parent190f2ace0efdf632f0451a9543f00f50148837bf (diff)
parent8e9ba5c48ea690060a814fbac6a8c046ab935d79 (diff)
Merge tag 'for-linus-4.17-ofs' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux
Pull orangefs updates from Mike Marshall: "Fixes and cleanups: - Documentation cleanups - removal of unused code - make some structs static - implement Orangefs vm_operations fault callout - eliminate two single-use functions and put their cleaned up code in line. - replace a vmalloc/memset instance with vzalloc - fix a race condition bug in wait code" * tag 'for-linus-4.17-ofs' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: Orangefs: documentation updates orangefs: document package install and xfstests procedure orangefs: remove unused code orangefs: make several *_operations structs static orangefs: implement vm_ops->fault orangefs: open code short single-use functions orangefs: replace vmalloc and memset with vzalloc orangefs: bug fix for a race condition when getting a slot
Diffstat (limited to 'fs/orangefs/orangefs-bufmap.c')
-rw-r--r--fs/orangefs/orangefs-bufmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/orangefs/orangefs-bufmap.c b/fs/orangefs/orangefs-bufmap.c
index 59f444dced9b..4f927023d095 100644
--- a/fs/orangefs/orangefs-bufmap.c
+++ b/fs/orangefs/orangefs-bufmap.c
@@ -71,9 +71,9 @@ static void put(struct slot_map *m, int slot)
spin_lock(&m->q.lock);
__clear_bit(slot, m->map);
v = ++m->c;
- if (unlikely(v == 1)) /* no free slots -> one free slot */
+ if (v > 0)
wake_up_locked(&m->q);
- else if (unlikely(v == -1)) /* finished dying */
+ if (unlikely(v == -1)) /* finished dying */
wake_up_all_locked(&m->q);
spin_unlock(&m->q.lock);
}