summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-04-02kill the 5th argument of generic_file_buffered_write()Al Viro5-10/+8
same story - it's &iocb->ki_pos in all cases Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02kill the 4th argument of __generic_file_aio_write()Al Viro5-12/+10
It's always equal to &iocb->ki_pos, where iocb is the value of the 1st argument. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02lustre: don't open-code kernel_recvmsg()Al Viro2-33/+9
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02ocfs2: don't open-code kernel_recvmsg()Al Viro1-18/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02drbd: don't open-code kernel_recvmsg()Al Viro1-11/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02constify blk_rq_map_user_iov() and friendsAl Viro4-10/+11
sg_iovec array passed to it can be const Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02lustre: switch to kernel_sendmsg()Al Viro2-36/+6
(casts are due to misannotations in lustre; it uses iovec where kvec would be correct type; too much noise to properly annotate right now). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02ocfs2: don't open-code kernel_sendmsg()Al Viro1-20/+8
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02take iov_iter stuff to mm/iov_iter.cAl Viro3-222/+225
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02process_vm_access: tidy up a bitAl Viro1-40/+19
saner variable names, update linuxdoc comments, etc. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02process_vm_access: don't bother with returning the amounts of bytes copiedAl Viro1-31/+16
we can calculate that in the caller just fine, TYVM Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02process_vm_rw_pages(): pass accurate amount of bytesAl Viro1-8/+14
... makes passing the amount of pages unnecessary Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02process_vm_access: take get_user_pages/put_pages one level upAl Viro1-58/+39
... and trim the fuck out of process_vm_rw_pages() argument list. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02process_vm_access: switch to copy_page_to_iter/iov_iter_copy_from_userAl Viro1-68/+23
... rather than open-coding those. As a side benefit, we get much saner loop calling those; we can just feed entire pages, instead of the "copy would span the iovec boundary, let's do it in two loop iterations" mess. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02process_vm_access: switch to iov_iterAl Viro1-34/+28
instead of keeping its pieces in separate variables and passing pointers to all of them... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02untangling process_vm_..., part 4Al Viro1-16/+13
instead of passing vector size (by value) and index (by reference), pass the number of elements remaining. That's all we care about in these functions by that point. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02untangling process_vm_..., part 3Al Viro1-4/+3
lift iov one more level out - from process_vm_rw_single_vec to process_vm_rw_core(). Same story as with the previous commit. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02untangling process_vm_..., part 2Al Viro1-3/+5
move iov to caller's stack frame; the value we assign to it on the next call of process_vm_rw_pages() is equal to the value it had when the last time we were leaving process_vm_rw_pages(). drop lvec argument of process_vm_rw_pages() - it's not used anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02untangling process_vm_..., part 1Al Viro1-5/+9
we want to massage it to use of iov_iter. This one is an equivalent transformation - just introduce a local variable mirroring lvec + *lvec_current. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02read_code(): go through vfs_read() instead of calling the method directlyAl Viro1-1/+1
... and don't skip on sanity checks. It's *not* a hot path, TYVM (a couple of calls per a.out execve(), for pity sake) and headers of random a.out binary are not to be trusted. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02fold cifs_iovec_read() into its (only) callerAl Viro1-18/+9
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02cifs_iovec_read: keep iov_iter between the calls of cifs_readdata_to_iov()Al Viro1-45/+17
... we are doing them on adjacent parts of file, so what happens is that each subsequent call works to rebuild the iov_iter to exact state it had been abandoned in by previous one. Just keep it through the entire cifs_iovec_read(). And use copy_page_to_iter() instead of doing kmap/copy_to_user/kunmap manually... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02switch vmsplice_to_user() to copy_page_to_iter()Al Viro1-89/+21
I've switched the sanity checks on iovec to rw_copy_check_uvector(); we might need to do a local analog, if any behaviour differences are not actually bugfixes here... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02switch pipe_read() to copy_page_to_iter()Al Viro1-71/+8
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02cifs_iovec_read(): resubmit shouldn't restart the loopAl Viro1-8/+8
... by that point the request we'd just resent is in the head of the list anyway. Just return to the beginning of the loop body... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02introduce copy_page_to_iter, kill loop over iovec in generic_file_aio_read()Al Viro4-144/+138
generic_file_aio_read() was looping over the target iovec, with loop over (source) pages nested inside that. Just set an iov_iter up and pass *that* to do_generic_file_aio_read(). With copy_page_to_iter() doing all work of mapping and copying a page to iovec and advancing iov_iter. Switch shmem_file_aio_read() to the same and kill file_read_actor(), while we are at it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02iov_iter: Move iov_iter to uio.hKent Overstreet2-32/+50
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
2014-04-02do_shmem_file_read(): call file_read_actor() directlyAl Viro1-3/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02callers of iov_copy_from_user_atomic() don't need pagecache_disable()Al Viro3-10/+0
... it does that itself (via kmap_atomic()) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02switch ->is_partially_uptodate() to saner argumentsAl Viro6-9/+9
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02pipe: kill ->map() and ->unmap()Al Viro7-100/+29
all pipe_buffer_operations have the same instances of those... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02fuse/dev: use atomic mapsAl Viro1-5/+5
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02VFS: Make delayed_free() call free_vfsmnt()David Howells1-12/+8
Make delayed_free() call free_vfsmnt() so that we don't have two functions doing the same job. This requires the calls to mnt_free_id() in free_vfsmnt() to be moved into the callers of that function. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02mn10300: kmap_atomic() returns void *, not unsigned long...Al Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02cifs: ->rename() without ->lookup() makes no senseAl Viro1-1/+0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02get rid of pointless checks for NULL ->i_opAl Viro5-7/+5
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02ntfs: don't put NULL into ->i_op/->i_fopAl Viro1-2/+0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02new helper: readlink_copy()Al Viro5-47/+12
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02lustre: generic_readlink() is just fine there, TYVM...Al Viro1-22/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02get rid of files_defer_init()Al Viro3-10/+4
the only thing it's doing these days is calculation of upper limit for fs.nr_open sysctl and that can be done statically Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02namei.c: move EXPORT_SYMBOL to corresponding definitionsAl Viro1-28/+27
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02get_write_access() is inlined, exporting it is pointlessAl Viro1-1/+0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02tidy do_dentry_open() up a bitAl Viro1-12/+10
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02mark struct file that had write access grabbed by open()Al Viro4-41/+11
new flag in ->f_mode - FMODE_WRITER. Set by do_dentry_open() in case when it has grabbed write access, checked by __fput() to decide whether it wants to drop the sucker. Allows to stop bothering with mnt_clone_write() in alloc_file(), along with fewer special_file() checks. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02fold __get_file_write_access() into its only callerAl Viro1-19/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02get rid of DEBUG_WRITECOUNTAl Viro10-78/+0
it only makes control flow in __fput() and friends more convoluted. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02don't bother with {get,put}_write_access() on non-regular filesAl Viro2-21/+9
it's pointless and actually leads to wrong behaviour in at least one moderately convoluted case (pipe(), close one end, try to get to another via /proc/*/fd and run into ETXTBUSY). Cc: stable@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02ncpfs: switch to sockfd_lookup()/sockfd_put()Al Viro2-40/+12
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02switch nbd to sockfd_lookup/sockfd_putAl Viro2-31/+20
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-04-02vhost: don't open-code sockfd_put()Al Viro1-7/+7
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>