From 6a0fb306738994d6f091791aeb11a5dc87ad8f4c Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 19 Jul 2016 03:04:34 -0400 Subject: new helper: wait_event_killable_exclusive() Signed-off-by: Al Viro --- include/linux/wait.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/linux') diff --git a/include/linux/wait.h b/include/linux/wait.h index 27d7a0ab5da3..c3ff74d764fa 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -600,6 +600,19 @@ do { \ __ret; \ }) +#define __wait_event_killable_exclusive(wq, condition) \ + ___wait_event(wq, condition, TASK_KILLABLE, 1, 0, \ + schedule()) + +#define wait_event_killable_exclusive(wq, condition) \ +({ \ + int __ret = 0; \ + might_sleep(); \ + if (!(condition)) \ + __ret = __wait_event_killable_exclusive(wq, condition); \ + __ret; \ +}) + #define __wait_event_freezable_exclusive(wq, condition) \ ___wait_event(wq, condition, TASK_INTERRUPTIBLE, 1, 0, \ -- cgit v1.2.3 From d72d9e2a5d7ec04a1f92925c5ac633d8031fa7fc Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Fri, 29 Jul 2016 14:10:57 +0200 Subject: mm: export filemap_check_errors() to modules Can be used by fuse, btrfs and f2fs to replace opencoded variants. Signed-off-by: Miklos Szeredi --- include/linux/fs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/fs.h b/include/linux/fs.h index dd288148a6b1..6f2536a3a916 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2507,6 +2507,7 @@ extern int __filemap_fdatawrite_range(struct address_space *mapping, loff_t start, loff_t end, int sync_mode); extern int filemap_fdatawrite_range(struct address_space *mapping, loff_t start, loff_t end); +extern int filemap_check_errors(struct address_space *mapping); extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end, int datasync); -- cgit v1.2.3