diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-03-31 05:12:36 -0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-04-02 19:40:36 -0800 |
commit | 6d8881705872edbc2c8fe539312aa40eaa8f281d (patch) | |
tree | a0e06c11cd5c8e6a94ba3a313d80b682d297b73f /libbcachefs/alloc.c | |
parent | 4921d02142fec87999cba32e991bb62c2a80184d (diff) |
Update bcachefs sources
Diffstat (limited to 'libbcachefs/alloc.c')
-rw-r--r-- | libbcachefs/alloc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libbcachefs/alloc.c b/libbcachefs/alloc.c index 3067181c..fc2a4ab4 100644 --- a/libbcachefs/alloc.c +++ b/libbcachefs/alloc.c @@ -384,6 +384,11 @@ int bch2_prio_read(struct bch_dev *ca) size_t b; int ret = 0; + if (ca->prio_read_done) + return 0; + + ca->prio_read_done = true; + spin_lock(&c->journal.lock); bucket = le64_to_cpu(c->journal.prio_buckets[ca->dev_idx]); spin_unlock(&c->journal.lock); |