projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
/proc/kpageflags: return KPF_BUDDY for "tail" buddy pages
[linux-2.6-block.git]
/
fs
/
read_write.c
diff --git
a/fs/read_write.c
b/fs/read_write.c
index 324ec271cc4e64868c34e3ff2f28ac2c0542475e..dadf24e5c95bb7004d105f0773430576bfc57cf5 100644
(file)
--- a/
fs/read_write.c
+++ b/
fs/read_write.c
@@
-17,6
+17,7
@@
#include <linux/splice.h>
#include <linux/compat.h>
#include <linux/mount.h>
#include <linux/splice.h>
#include <linux/compat.h>
#include <linux/mount.h>
+#include <linux/fs.h>
#include "internal.h"
#include <asm/uaccess.h>
#include "internal.h"
#include <asm/uaccess.h>
@@
-183,7
+184,7
@@
loff_t no_seek_end_llseek(struct file *file, loff_t offset, int whence)
switch (whence) {
case SEEK_SET: case SEEK_CUR:
return generic_file_llseek_size(file, offset, whence,
switch (whence) {
case SEEK_SET: case SEEK_CUR:
return generic_file_llseek_size(file, offset, whence,
-
~0ULL
, 0);
+
OFFSET_MAX
, 0);
default:
return -EINVAL;
}
default:
return -EINVAL;
}
@@
-1532,10
+1533,12
@@
int vfs_clone_file_range(struct file *file_in, loff_t pos_in,
if (!(file_in->f_mode & FMODE_READ) ||
!(file_out->f_mode & FMODE_WRITE) ||
if (!(file_in->f_mode & FMODE_READ) ||
!(file_out->f_mode & FMODE_WRITE) ||
- (file_out->f_flags & O_APPEND) ||
- !file_in->f_op->clone_file_range)
+ (file_out->f_flags & O_APPEND))
return -EBADF;
return -EBADF;
+ if (!file_in->f_op->clone_file_range)
+ return -EOPNOTSUPP;
+
ret = clone_verify_area(file_in, pos_in, len, false);
if (ret)
return ret;
ret = clone_verify_area(file_in, pos_in, len, false);
if (ret)
return ret;