lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081120144307.10667.19967.stgit@warthog.procyon.org.uk>
Date:	Thu, 20 Nov 2008 14:43:07 +0000
From:	David Howells <dhowells@...hat.com>
To:	trond.myklebust@....uio.no, viro@...IV.linux.org.uk
Cc:	dhowells@...hat.com, nfsv4@...ux-nfs.org,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [PATCH 17/45] FS-Cache: Bit waiting helpers [ver #41]

Add helpers for use with wait_on_bit().

Signed-off-by: David Howells <dhowells@...hat.com>
---

 fs/fscache/fsc-internal.h |    3 +++
 fs/fscache/fsc-main.c     |   20 ++++++++++++++++++++
 2 files changed, 23 insertions(+), 0 deletions(-)


diff --git a/fs/fscache/fsc-internal.h b/fs/fscache/fsc-internal.h
index 8f1beb5..5418101 100644
--- a/fs/fscache/fsc-internal.h
+++ b/fs/fscache/fsc-internal.h
@@ -58,6 +58,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-stats.c
  */
diff --git a/fs/fscache/fsc-main.c b/fs/fscache/fsc-main.c
index 5ecbaa7..714c0ef 100644
--- a/fs/fscache/fsc-main.c
+++ b/fs/fscache/fsc-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);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ