VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: David Howells <dhowells@redhat.com> 2009-04-03 16:42:38 +0100 committer: David Howells <dhowells@redhat.com> 2009-04-03 16:42:38 +0100 commit: 2868cbea72dc89ae0eb17693596b1dedaafff1c5 parent: 726dd7ff10c217dd74329c94643dc8ebea27334b
Commit Summary:
FS-Cache: Bit waiting helpers
Diffstat:
2 files changed, 21 insertions, 0 deletions
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h
index 4c6ba561e966..16389942a54e 100644
--- a/fs/fscache/internal.h
+++ b/fs/fscache/internal.h
@@ -82,6 +82,9 @@ extern unsigned fscache_defer_create;
 extern unsigned fscache_debug;
 extern struct kobject *fscache_root;
 
+extern int fscache_wait_bit(void *);
+extern int fscache_wait_bit_interruptible(void *);
+
 /*
  * fsc-proc.c
  */
diff --git a/fs/fscache/main.c b/fs/fscache/main.c
index 48b79d2deac1..4de41b597499 100644
--- a/fs/fscache/main.c
+++ b/fs/fscache/main.c
@@ -102,3 +102,23 @@ static void __exit fscache_exit(void)
 }
 
 module_exit(fscache_exit);
+
+/*
+ * wait_on_bit() sleep function for uninterruptible waiting
+ */
+int fscache_wait_bit(void *flags)
+{
+	schedule();
+	return 0;
+}
+EXPORT_SYMBOL(fscache_wait_bit);
+
+/*
+ * wait_on_bit() sleep function for interruptible waiting
+ */
+int fscache_wait_bit_interruptible(void *flags)
+{
+	schedule();
+	return signal_pending(current);
+}
+EXPORT_SYMBOL(fscache_wait_bit_interruptible);