summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* make new_sync_{read,write}() staticAl Viro2015-04-1159-153/+11
| | | | | | | | All places outside of core VFS that checked ->read and ->write for being NULL or called the methods directly are gone now, so NULL {read,write} with non-NULL {read,write}_iter will do the right thing in all cases. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* coredump: accept any write methodAl Viro2015-04-111-1/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch /dev/loop to vfs_iter_write()Al Viro2015-04-111-5/+7
| | | | | | | all writable files that might be used as backing store for /dev/loop already support ->write_iter() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* serial2002: switch to __vfs_read/__vfs_writeAl Viro2015-04-111-12/+6
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ashmem: use __vfs_read()Al Viro2015-04-111-1/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* export __vfs_read()Al Viro2015-04-111-8/+5
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* autofs: switch to __vfs_write()Al Viro2015-04-112-2/+2
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* new helper: __vfs_write()Al Viro2015-04-112-12/+17
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Merge branch '9p-iov_iter' into for-nextAl Viro2015-04-1112-627/+355
|\
| * net/9p: remove (now-)unused helpersAl Viro2015-04-112-43/+1
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * p9_client_attach(): set fid->uid correctlyAl Viro2015-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | it's almost always equal to current_fsuid(), but there's an exception - if the first writeback fid is opened by non-root *and* that happens before root has done any lookups in /, we end up doing attach for root. The current code leaves the resulting FID owned by root from the server POV and by non-root from the client one. Unfortunately, it means that e.g. massive dcache eviction will leave that user buggered - they'll end up redoing walks from / *and* picking that FID every time. As soon as they try to create something, the things will get nasty. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * 9p: we are leaking glock.client_id in v9fs_file_getlock()Al Viro2015-04-111-0/+2
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * 9p: switch to ->read_iter/->write_iterAl Viro2015-04-111-44/+39
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * 9p: get rid of v9fs_direct_file_read()Al Viro2015-04-112-51/+12
| | | | | | | | | | | | do it in ->direct_IO()... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * 9p: switch p9_client_read() to passing struct iov_iter *Al Viro2015-04-117-183/+108
| | | | | | | | | | | | ... and make it loop Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * 9p: get rid of v9fs_direct_file_write()Al Viro2015-04-112-82/+17
| | | | | | | | | | | | just handle it in ->direct_IO() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * 9p: fold v9fs_file_write_internal() into the callerAl Viro2015-04-112-49/+30
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * 9p: switch ->writepage() to direct use of p9_client_write()Al Viro2015-04-111-22/+13
| | | | | | | | | | | | Don't mess with kmap() - just use ITER_BVEC. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * 9p: switch p9_client_write() to passing it struct iov_iter *Al Viro2015-04-114-97/+62
| | | | | | | | | | | | ... and make it loop until it's done Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * net/9p: switch the guts of p9_client_{read,write}() to iov_iterAl Viro2015-04-114-133/+147
| | | | | | | | | | | | | | ... and have get_user_pages_fast() mapping fewer pages than requested to generate a short read/write. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | switch hugetlbfs to ->read_iter()Al Viro2015-04-111-58/+34
| | | | | | | | | | | | | | ... and fix the case when the area we are asked to read crosses a hugepage boundary Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | coda: switch to ->read_iter/->write_iterAl Viro2015-04-111-25/+15
| | | | | | | | | | | | | | ... and request the same from the local cache - all filesystems with anything usable for that support those already. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | ncpfs: switch to ->read_iter/->write_iterAl Viro2015-04-113-63/+37
|/ | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* nommu: use __vfs_read()Al Viro2015-04-111-2/+2
| | | | | | ... instead of open-coding the call of ->read() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* acct: check FMODE_CAN_WRITEAl Viro2015-04-111-1/+1
| | | | | | it's not calling ->write() directly anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* aio_run_iocb(): kill dead checkAl Viro2015-04-111-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | We check if ->ki_pos is positive. However, by that point we have already done rw_verify_area(), which would have rejected such unless the file had been one of /dev/mem, /dev/kmem and /proc/kcore. All of which do not have vectored rw methods, so we would've bailed out even earlier. This check had been introduced before rw_verify_area() had been added there - in fact, it was a subset of checks done on sync paths by rw_verify_area() (back then the /dev/mem exception didn't exist at all). The rest of checks (mandatory locking, etc.) hadn't been added until later. Unfortunately, by the time the call of rw_verify_area() got added, the /dev/mem exception had already appeared, so it wasn't obvious that the older explicit check downstream had become dead code. It *is* a dead code, though, since the few files for which the exception applies do not have ->aio_{read,write}() or ->{read,write}_iter() and for them we won't reach that check anyway. What's more, even if we ever introduce vectored methods for /dev/mem and friends, they'll have to cope with negative positions anyway, since readv(2) and writev(2) are using the same checks as read(2) and write(2) - i.e. rw_verify_area(). Let's bury it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ioctx_alloc(): remove pointless checkAl Viro2015-04-111-2/+1
| | | | | | | | | | Way, way back kiocb used to be picked from arrays, so ioctx_alloc() checked for multiplication overflow when calculating the size of such array. By the time fs/aio.c went into the tree (in 2002) they were already allocated one-by-one by kmem_cache_alloc(), so that check had already become pointless. Let's bury it... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* lustre: kill unused members of struct vvp_thread_infoAl Viro2015-04-111-2/+0
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* expand __fuse_direct_write() in both callersAl Viro2015-04-111-25/+17
| | | | | | | it's actually shorter that way *and* later we'll want iocb in scope of generic_write_check() caller. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* fuse: switch fuse_direct_io_file_operations to ->{read,write}_iter()Al Viro2015-04-111-17/+12
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* cuse: switch to iov_iterAl Viro2015-04-111-17/+10
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Merge branch 'for-davem' into for-nextAl Viro2015-04-111537-28671/+47630
|\
| * new helper: msg_data_left()Al Viro2015-04-118-23/+27
| | | | | | | | | | | | convert open-coded instances Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Merge remote-tracking branch 'dh/afs' into for-davemAl Viro2015-04-117-35/+166
| |\
| | * kafs: Add more "unified AFS" error codesNathaniel Wesley Filardo2015-04-011-1/+15
| | | | | | | | | | | | | | | | | | | | | This should cover the set emitted by viced and the volume server. Signed-off-by: Nathaniel Wesley Filardo <nwf@cs.jhu.edu> Signed-off-by: David Howells <dhowells@redhat.com>
| | * RxRPC: Handle VERSION Rx protocol packetsDavid Howells2015-04-014-2/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle VERSION Rx protocol packets. We should respond to a VERSION packet with a string indicating the Rx version. This is a maximum of 64 characters and is padded out to 65 chars with NUL bytes. Note that other AFS clients use the version request as a NAT keepalive so we need to handle it rather than returning an abort. The standard formulation seems to be: <project> <version> built <yyyy>-<mm>-<dd> for example: " OpenAFS 1.6.2 built 2013-05-07 " (note the three extra spaces) as obtained with: rxdebug grand.mit.edu -version from the openafs package. Signed-off-by: David Howells <dhowells@redhat.com>
| | * AFS: afs_send_empty_reply() doesn't require an iovec arrayDavid Howells2015-04-011-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | afs_send_empty_reply() doesn't require an iovec array with which to initialise the msghdr, but can pass NULL instead. Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David Howells <dhowells@redhat.com>
| | * RxRPC: Use iov_iter_count() in rxrpc_send_data() instead of the len argumentDavid Howells2015-04-011-13/+11
| | | | | | | | | | | | | | | | | | | | | Use iov_iter_count() in rxrpc_send_data() to get the remaining data length instead of using the len argument as the len argument is now redundant. Signed-off-by: David Howells <dhowells@redhat.com>
| | * RxRPC: Don't call skb_add_data() if there's no data to copyDavid Howells2015-04-011-19/+19
| | | | | | | | | | | | | | | | | | | | | Don't call skb_add_data() in rxrpc_send_data() if there's no data to copy and also skip the calculations associated with it in such a case. Signed-off-by: David Howells <dhowells@redhat.com>
| | * RxRPC: Fix the conversion to iov_iterDavid Howells2015-04-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit: commit af2b040e470b470bfc881981db3c796072853eae Author: Al Viro <viro@zeniv.linux.org.uk> Date: Thu Nov 27 21:44:24 2014 -0500 Subject: rxrpc: switch rxrpc_send_data() to iov_iter primitives incorrectly changes a do-while loop into a while loop in rxrpc_send_data(). Unfortunately, at least one pass through the loop is required - even if there is no data - so that the packet the closes the send phase can be sent if MSG_MORE is not set. Signed-off-by: David Howells <dhowells@redhat.com>
| * | get rid of the size argument of sock_sendmsg()Al Viro2015-04-113-15/+16
| | | | | | | | | | | | | | | | | | it's equal to iov_iter_count(&msg->msg_iter) in all cases Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | switch kernel_sendmsg() and kernel_recvmsg() to iov_iter_kvec()Al Viro2015-04-091-17/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For kernel_sendmsg() that eliminates the need to play with setfs(); for kernel_recvmsg() it does *not* - a couple of callers are using it with non-NULL ->msg_control, which would be treated as userland address on recvmsg side of things. In all cases we are really setting a kvec-backed iov_iter, though. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | net: switch importing msghdr from userland to {compat_,}import_iovec()Al Viro2015-04-093-31/+20
| | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | net: switch sendto() and recvfrom() to import_single_range()Al Viro2015-04-091-16/+8
| | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | Merge branch 'iov_iter' into for-davemAl Viro2015-04-092-0/+71
| |\ \
| * \ \ Merge branch 'iocb' into for-davemAl Viro2015-04-0969-266/+199
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trivial conflict in net/socket.c and non-trivial one in crypto - that one had evaded aio_complete() removal. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * \ \ \ Merge branch 'for-upstream' of ↵David S. Miller2015-04-0722-338/+570
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2015-04-04 Here's what's probably the last bluetooth-next pull request for 4.1: - Fixes for LE advertising data & advertising parameters - Fix for race condition with HCI_RESET flag - New BNEPGETSUPPFEAT ioctl, needed for certification - New HCI request callback type to get the resulting skb - Cleanups to use BIT() macro wherever possible - Consolidate Broadcom device entries in the btusb HCI driver - Check for valid flags in CMTP, HIDP & BNEP - Disallow local privacy & OOB data combo to prevent a potential race - Expose SMP & ECDH selftest results through debugfs - Expose current Device ID info through debugfs Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| | * | | | Bluetooth: Fix location of TX power field in LE advertising dataMarcel Holtmann2015-04-041-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TX power field in the LE advertising data should be placed last since it needs to be possible to enable kernel controlled TX power, but still allow for userspace provided flags field. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| | * | | | Bluetooth: hidp: Use BIT(x) instead of (1 << x)Marcel Holtmann2015-04-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| | * | | | Bluetooth: cmtp: Use BIT(x) instead of (1 << x)Marcel Holtmann2015-04-042-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>