diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 22:22:56 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 22:22:56 +0200 |
commit | fa927894bbb4a4c7669c72bad1924991022fda38 (patch) | |
tree | 93560f1a096973235fe9ff50c436f5239c1c499a /mm | |
parent | Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmare... (diff) | |
parent | ->aio_read and ->aio_write removed (diff) | |
download | linux-fa927894bbb4a4c7669c72bad1924991022fda38.tar.xz linux-fa927894bbb4a4c7669c72bad1924991022fda38.zip |
Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull second vfs update from Al Viro:
"Now that net-next went in... Here's the next big chunk - killing
->aio_read() and ->aio_write().
There'll be one more pile today (direct_IO changes and
generic_write_checks() cleanups/fixes), but I'd prefer to keep that
one separate"
* 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (37 commits)
->aio_read and ->aio_write removed
pcm: another weird API abuse
infinibad: weird APIs switched to ->write_iter()
kill do_sync_read/do_sync_write
fuse: use iov_iter_get_pages() for non-splice path
fuse: switch to ->read_iter/->write_iter
switch drivers/char/mem.c to ->read_iter/->write_iter
make new_sync_{read,write}() static
coredump: accept any write method
switch /dev/loop to vfs_iter_write()
serial2002: switch to __vfs_read/__vfs_write
ashmem: use __vfs_read()
export __vfs_read()
autofs: switch to __vfs_write()
new helper: __vfs_write()
switch hugetlbfs to ->read_iter()
coda: switch to ->read_iter/->write_iter
ncpfs: switch to ->read_iter/->write_iter
net/9p: remove (now-)unused helpers
p9_client_attach(): set fid->uid correctly
...
Diffstat (limited to 'mm')
-rw-r--r-- | mm/nommu.c | 4 | ||||
-rw-r--r-- | mm/shmem.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/mm/nommu.c b/mm/nommu.c index 3fba2dc97c44..e544508e2a4b 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1016,7 +1016,7 @@ static int validate_mmap_request(struct file *file, * device */ if (!file->f_op->get_unmapped_area) capabilities &= ~NOMMU_MAP_DIRECT; - if (!file->f_op->read) + if (!(file->f_mode & FMODE_CAN_READ)) capabilities &= ~NOMMU_MAP_COPY; /* The file shall have been opened with read permission. */ @@ -1240,7 +1240,7 @@ static int do_mmap_private(struct vm_area_struct *vma, old_fs = get_fs(); set_fs(KERNEL_DS); - ret = vma->vm_file->f_op->read(vma->vm_file, base, len, &fpos); + ret = __vfs_read(vma->vm_file, base, len, &fpos); set_fs(old_fs); if (ret < 0) diff --git a/mm/shmem.c b/mm/shmem.c index 80b360c7bcd1..1ea2400b5245 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3118,8 +3118,6 @@ static const struct file_operations shmem_file_operations = { .mmap = shmem_mmap, #ifdef CONFIG_TMPFS .llseek = shmem_file_llseek, - .read = new_sync_read, - .write = new_sync_write, .read_iter = shmem_file_read_iter, .write_iter = generic_file_write_iter, .fsync = noop_fsync, |