Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2868cbea authored by David Howells's avatar David Howells
Browse files

FS-Cache: Bit waiting helpers



Add helpers for use with wait_on_bit().

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Acked-by: default avatarSteve Dickson <steved@redhat.com>
Acked-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Tested-by: default avatarDaire Byrne <Daire.Byrne@framestore.com>
parent 726dd7ff
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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
 */
+20 −0
Original line number Diff line number Diff line
@@ -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);