aboutsummaryrefslogtreecommitdiff
path: root/fs/fscache/main.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-04-03 16:42:38 +0100
committerDavid Howells <dhowells@redhat.com>2009-04-03 16:42:38 +0100
commit2868cbea72dc89ae0eb17693596b1dedaafff1c5 (patch)
tree277e2cbdafabe6ca74458445838a07b571a94996 /fs/fscache/main.c
parent726dd7ff10c217dd74329c94643dc8ebea27334b (diff)
FS-Cache: Bit waiting helpers
Add helpers for use with wait_on_bit(). Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Tested-by: Daire Byrne <Daire.Byrne@framestore.com>
Diffstat (limited to 'fs/fscache/main.c')
-rw-r--r--fs/fscache/main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/fscache/main.c b/fs/fscache/main.c
index 48b79d2deac..4de41b59749 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);