aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorNick Piggin <nickpiggin@yahoo.com.au>2005-06-28 20:45:15 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-28 21:20:35 -0700
commitfb3cc4320e1fd87143683b540e459a2e20fdc9bb (patch)
treebc684070d75cd741820410d743cffb4bd0721504 /include/linux
parent[PATCH] blk: reduce locking (diff)
downloadlinux-dev-fb3cc4320e1fd87143683b540e459a2e20fdc9bb.tar.xz
linux-dev-fb3cc4320e1fd87143683b540e459a2e20fdc9bb.zip
[PATCH] blk: light iocontext ops
get_io_context needlessly turned off interrupts and checked for racing io context creations. Both of which aren't needed, because the io context can only be created while in process context of the current process. Also, split the function in 2. A light version, current_io_context does not elevate the reference count specifically, but can be used when in process context, because the process holds a reference itself. Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 21a8674cd149..0881b5cdee3d 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -96,6 +96,7 @@ struct io_context {
void put_io_context(struct io_context *ioc);
void exit_io_context(void);
+struct io_context *current_io_context(int gfp_flags);
struct io_context *get_io_context(int gfp_flags);
void copy_io_context(struct io_context **pdst, struct io_context **psrc);
void swap_io_context(struct io_context **ioc1, struct io_context **ioc2);