aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-03-04 11:08:05 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-03-04 11:08:05 -0500
commitce932967b9f77c130d4936d1e20d619a628ae08f (patch)
treeaf0274e83664d9563468f0647b178427d3b18560 /fs
parent8727e28ddebb031d80b5e261c98c24f1dcb9a82f (diff)
parentcc66b4512cae8df4ed1635483210aabf7690ec27 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: block: fix blkdev_issue_flush() not detecting and passing EOPNOTSUPP back block: fix shadowed variable warning in blk-map.c block: remove extern on function definition cciss: remove READ_AHEAD define and use block layer defaults make cdrom.c:check_for_audio_disc() static block/genhd.c: proper externs unexport blk_rq_map_user_iov unexport blk_{get,put}_queue block/genhd.c: cleanups proper prototype for blk_dev_init() block/blk-tag.c should #include "blk.h" Fix DMA access of block device in 64-bit kernel on some non-x86 systems with 4GB or upper 4GB memory block: separate out padding from alignment block: restore the meaning of rq->data_len to the true data length resubmit: cciss: procfs updates to display info about many splice: only return -EAGAIN if there's hope of more data block: fix kernel-docbook parameters and files
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/proc_misc.c3
-rw-r--r--fs/splice.c12
2 files changed, 9 insertions, 6 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 468805d40e2b..2d563979cb02 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -32,6 +32,7 @@
32#include <linux/interrupt.h> 32#include <linux/interrupt.h>
33#include <linux/swap.h> 33#include <linux/swap.h>
34#include <linux/slab.h> 34#include <linux/slab.h>
35#include <linux/genhd.h>
35#include <linux/smp.h> 36#include <linux/smp.h>
36#include <linux/signal.h> 37#include <linux/signal.h>
37#include <linux/module.h> 38#include <linux/module.h>
@@ -377,7 +378,6 @@ static int stram_read_proc(char *page, char **start, off_t off,
377#endif 378#endif
378 379
379#ifdef CONFIG_BLOCK 380#ifdef CONFIG_BLOCK
380extern const struct seq_operations partitions_op;
381static int partitions_open(struct inode *inode, struct file *file) 381static int partitions_open(struct inode *inode, struct file *file)
382{ 382{
383 return seq_open(file, &partitions_op); 383 return seq_open(file, &partitions_op);
@@ -389,7 +389,6 @@ static const struct file_operations proc_partitions_operations = {
389 .release = seq_release, 389 .release = seq_release,
390}; 390};
391 391
392extern const struct seq_operations diskstats_op;
393static int diskstats_open(struct inode *inode, struct file *file) 392static int diskstats_open(struct inode *inode, struct file *file)
394{ 393{
395 return seq_open(file, &diskstats_op); 394 return seq_open(file, &diskstats_op);
diff --git a/fs/splice.c b/fs/splice.c
index 9b559ee711a8..0670c915cd35 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1669,6 +1669,13 @@ static int link_pipe(struct pipe_inode_info *ipipe,
1669 i++; 1669 i++;
1670 } while (len); 1670 } while (len);
1671 1671
1672 /*
1673 * return EAGAIN if we have the potential of some data in the
1674 * future, otherwise just return 0
1675 */
1676 if (!ret && ipipe->waiting_writers && (flags & SPLICE_F_NONBLOCK))
1677 ret = -EAGAIN;
1678
1672 inode_double_unlock(ipipe->inode, opipe->inode); 1679 inode_double_unlock(ipipe->inode, opipe->inode);
1673 1680
1674 /* 1681 /*
@@ -1709,11 +1716,8 @@ static long do_tee(struct file *in, struct file *out, size_t len,
1709 ret = link_ipipe_prep(ipipe, flags); 1716 ret = link_ipipe_prep(ipipe, flags);
1710 if (!ret) { 1717 if (!ret) {
1711 ret = link_opipe_prep(opipe, flags); 1718 ret = link_opipe_prep(opipe, flags);
1712 if (!ret) { 1719 if (!ret)
1713 ret = link_pipe(ipipe, opipe, len, flags); 1720 ret = link_pipe(ipipe, opipe, len, flags);
1714 if (!ret && (flags & SPLICE_F_NONBLOCK))
1715 ret = -EAGAIN;
1716 }
1717 } 1721 }
1718 } 1722 }
1719 1723