]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/read_write.c
Driver Core: add kobj_attribute handling
[linux-2.6-omap-h63xx.git] / fs / read_write.c
index 2527cf035b0ec0d71a36df0f8d9392428ddaf769..ea1f94cc722e0c942111b9849cedf8b1aef1d86a 100644 (file)
@@ -205,7 +205,7 @@ int rw_verify_area(int read_write, struct file *file, loff_t *ppos, size_t count
        if (unlikely((pos < 0) || (loff_t) (pos + count) < 0))
                goto Einval;
 
-       if (unlikely(inode->i_flock && MANDATORY_LOCK(inode))) {
+       if (unlikely(inode->i_flock && mandatory_lock(inode))) {
                int retval = locks_mandatory_area(
                        read_write == READ ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE,
                        inode, file, pos, count);
@@ -370,7 +370,7 @@ asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)
 
        return ret;
 }
-EXPORT_SYMBOL_GPL(sys_read);
+EXPORT_UNUSED_SYMBOL_GPL(sys_read); /* to be deleted for 2.6.25 */
 
 asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count)
 {
@@ -724,8 +724,7 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
        in_inode = in_file->f_path.dentry->d_inode;
        if (!in_inode)
                goto fput_in;
-       if (!in_file->f_op || (!in_file->f_op->sendfile &&
-           !in_file->f_op->splice_read))
+       if (!in_file->f_op || !in_file->f_op->splice_read)
                goto fput_in;
        retval = -ESPIPE;
        if (!ppos)
@@ -778,21 +777,18 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
                count = max - pos;
        }
 
-       if (in_file->f_op->splice_read) {
-               fl = 0;
+       fl = 0;
 #if 0
-               /*
-                * We need to debate whether we can enable this or not. The
-                * man page documents EAGAIN return for the output at least,
-                * and the application is arguably buggy if it doesn't expect
-                * EAGAIN on a non-blocking file descriptor.
-                */
-               if (in_file->f_flags & O_NONBLOCK)
-                       fl = SPLICE_F_NONBLOCK;
+       /*
+        * We need to debate whether we can enable this or not. The
+        * man page documents EAGAIN return for the output at least,
+        * and the application is arguably buggy if it doesn't expect
+        * EAGAIN on a non-blocking file descriptor.
+        */
+       if (in_file->f_flags & O_NONBLOCK)
+               fl = SPLICE_F_NONBLOCK;
 #endif
-               retval = do_splice_direct(in_file, ppos, out_file, count, fl);
-       } else
-               retval = in_file->f_op->sendfile(in_file, ppos, count, file_send_actor, out_file);
+       retval = do_splice_direct(in_file, ppos, out_file, count, fl);
 
        if (retval > 0) {
                add_rchar(current, retval);