summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2002-08-12 18:06:55 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-08-12 18:06:55 -0700
commit8c0b388ab19c6a0c1a726ec00c445038d4da7fdc (patch)
tree5f426a93200593d9eeed8a65044fafb290bc2d7a /include/linux
parent630986cd7db778443b1a8dd4d1f0afcab5870aa0 (diff)
[PATCH] i_sem-less generic_file_write for O_DIRECT & XFS
There are a number of places where generic_file_write could be used if it didn't take i_sem by itself or where it doesn't need it: (1) XFS needs to do some preparation in it's write file operation (most notably taking it's own per-inode locks), after taking i_sem, but before calling the guts of generic_file_write. (2) blockdevices are happy with parralel get_block() operations, and there is nothing i_sem could protect. This patch introduces a generic_file_write_nolock and makes the good old generic_file_write a wrapper around. The block device code is switched over to it.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 192107379fd9..ec0f6edac31b 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1241,6 +1241,7 @@ extern int generic_file_mmap(struct file *, struct vm_area_struct *);
extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *);
extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *);
+extern ssize_t generic_file_write_nolock(struct file *, const char *, size_t, loff_t *);
extern ssize_t generic_file_sendfile(struct file *, struct file *, loff_t *, size_t);
extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t);
ssize_t generic_file_direct_IO(int rw, struct inode *inode, char *buf,