summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-06-13 17:06:05 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2017-06-13 17:41:59 -0800
commit38f22164a9a3f2f8e33af8e0cc3ce4f17ef99cde (patch)
tree3b5de0fc73f51199bea8fcb63ad97a5b01a7c4ca /include
parent914c4d19ed4a1c64268c4c23609c43d3d6765969 (diff)
Update bcachefs sources to 6a25f7a00d bcachefs: fix ioctl code
Diffstat (limited to 'include')
-rw-r--r--include/linux/bitops.h8
-rw-r--r--include/linux/wait.h2
-rw-r--r--include/trace/events/bcachefs.h2
3 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 239574c1..dc2927b3 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -38,6 +38,14 @@ static inline void set_bit(long nr, volatile unsigned long *addr)
__atomic_or_fetch(p, mask, __ATOMIC_RELAXED);
}
+static inline void __clear_bit(int nr, volatile unsigned long *addr)
+{
+ unsigned long mask = BIT_MASK(nr);
+ unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr);
+
+ *p &= ~mask;
+}
+
static inline void clear_bit(long nr, volatile unsigned long *addr)
{
unsigned long mask = BIT_MASK(nr);
diff --git a/include/linux/wait.h b/include/linux/wait.h
index f6f5757a..62d15e5d 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -90,6 +90,8 @@ do { \
__wait_event(wq, condition); \
} while (0)
+#define wait_event_killable(wq, condition) ({wait_event(wq, condition); 0; })
+
#define __wait_event_timeout(wq, condition, timeout) \
___wait_event(wq, ___wait_cond_timeout(condition), \
TASK_UNINTERRUPTIBLE, 0, timeout, \
diff --git a/include/trace/events/bcachefs.h b/include/trace/events/bcachefs.h
index 06cb5ff3..e5052b8d 100644
--- a/include/trace/events/bcachefs.h
+++ b/include/trace/events/bcachefs.h
@@ -87,7 +87,7 @@ DECLARE_EVENT_CLASS(bio,
),
TP_fast_assign(
- __entry->dev = bio->bi_bdev->bd_dev;
+ __entry->dev = bio->bi_bdev ? bio->bi_bdev->bd_dev : 0;
__entry->sector = bio->bi_iter.bi_sector;
__entry->nr_sector = bio->bi_iter.bi_size >> 9;
blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size);