summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-linus-2' of ↵Linus Torvalds2015-04-1590-1185/+598
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * ->aio_read and ->aio_write removedAl Viro2015-04-118-54/+9
| | | | | | | | | | | | no remaining users Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * pcm: another weird API abuseAl Viro2015-04-111-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | readv() and writev() should _not_ ignore all but the first ->iov_len, among other things. Really weird abuse of those syscalls - it expects a vector element per channel, with identical lengths (it actually assumes them to be identical - no checking is done). readv() and writev() are really bad match for that. Unfortunately, userland API is userland API and we can't do anything about them. Converted to ->read_iter/->write_iter. Please, _please_ don't do anything of that kind when designing new interfaces. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * infinibad: weird APIs switched to ->write_iter()Al Viro2015-04-112-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | Things Not To Do When Writing A Driver, part 1001st: have writev() and write() on the same file doing completely different things. As in, "interpret very different sets of commands". We _can_ handle that, but it's a bloody bad idea. Don't do that in new drivers. Ever. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * kill do_sync_read/do_sync_writeAl Viro2015-04-112-40/+0
| | | | | | | | | | | | | | | | all remaining instances of aio_{read,write} (all 4 of them) have explicit ->read and ->write resp.; do_sync_read/do_sync_write is never called by __vfs_read/__vfs_write anymore and no other users had been left. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fuse: use iov_iter_get_pages() for non-splice pathAl Viro2015-04-111-24/+17
| | | | | | | | | | | | store reference to iter instead of that to iovec Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fuse: switch to ->read_iter/->write_iterAl Viro2015-04-111-12/+14
| | | | | | | | | | | | we just change the calling conventions here; more work to follow. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * switch drivers/char/mem.c to ->read_iter/->write_iterAl Viro2015-04-111-9/+9
| | | | | | | | | | | | | | | | Note that _these_ guys have ->read() and ->write() left in place - they are eqiuvalent to what we'd get if we replaced those with NULL, but we are talking about hot paths here. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * 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
| |\
* | \ Merge branch 'kconfig' of ↵Linus Torvalds2015-04-1515-198/+174
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kconfig updates from Michal Marek: "Here is the kconfig stuff for v4.1-rc1: - fixes for mergeconfig (used by make kvmconfig/tinyconfig) - header cleanup - make -s *config is silent now" * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kconfig: Do not print status messages in make -s mode kconfig: Simplify Makefile kbuild: add generic mergeconfig target, %.config merge_config.sh: rename MAKE to RUNMAKE merge_config.sh: improve indentation kbuild: mergeconfig: remove redundant $(objtree) kbuild: mergeconfig: move an error check to merge_config.sh kbuild: mergeconfig: fix "jobserver unavailable" warning kconfig: Remove unnecessary prototypes from headers kconfig: Remove dead code kconfig: Get rid of the P() macro in headers kconfig: fix a misspelling in scripts/kconfig/merge_config.sh
| * | | kconfig: Do not print status messages in make -s modeMichal Marek2015-04-096-32/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an -s option to the various frontends and pass it when make -s is used. Also, use $(kecho) instead of @echo in the Makefile. Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | | kconfig: Simplify MakefileMichal Marek2015-04-081-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | Use a single rule for targets handled directly by the conf program. Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | | kbuild: add generic mergeconfig target, %.configMasahiro Yamada2015-03-241-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "scripts/kconfig/merge_config.sh && make oldconfig" works well enough for merging local config fragments, but Kbuild currently has the entry points only for "kvmconfig" and "tinyconfig". This commit provides the generic target for mergeconfig, so we can manage our own config fragments easily: put "foo.config" in arch/$(SRCARCH)/configs/ or kernel/configs/, and then run "make foo.config". Now "make kvmconfig" is just a shorthand of "make kvm_guest.config". Likewise, "make tinyconfig" is equivalent to "make allnoconfig tiny.config". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | | merge_config.sh: rename MAKE to RUNMAKEMasahiro Yamada2015-03-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The variable "MAKE" is used to store the command name that has invoked the Makefile. (Actually, it is already set to "make" if you run this script from a Makefile.) In this script, however, it is used to determine if Make should be run or not. It is not what we usually expect. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | | merge_config.sh: improve indentationMasahiro Yamada2015-03-241-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is true that we do not want to move the code too far to the right, but something like below is not preferred: if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then echo Value of $CFG is redefined by fragment $MERGE_FILE: echo Previous value: $PREV_VAL echo New value: $NEW_VAL echo elif [ "$WARNREDUN" = "true" ]; then echo Value of $CFG is redundant by fragment $MERGE_FILE: fi To fix this, call "continue" if the "grep" command fails to find the given CONFIG. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | | kbuild: mergeconfig: remove redundant $(objtree)Masahiro Yamada2015-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kbuild always runs in $(objtree). Actually, $(objtree) is always set to "." by the top-level Makefile. We can omit "-O $(objtree)" and "$(objtree)/". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | | kbuild: mergeconfig: move an error check to merge_config.shMasahiro Yamada2015-03-242-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, "make tinyconfig" does not work with "-j" option. $ make mrproper $ make -j8 tinyconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.lex.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf --allnoconfig Kconfig # # configuration written to .config # scripts/kconfig/Makefile:122: *** You need an existing .config for this target. Stop. make: *** [tinyconfig] Error 2 As shown above, "allnoconfig" has created the .config file before mergeconfig is called, but Make still raises a false alarm because of some sort of race condition. We can fix this issue by moving the error check to the shell script. Anyway, scripts/kconfig/merge_config.sh always requires an existing .config as a base file. It is reasonable to check its existence in the shell script. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | | kbuild: mergeconfig: fix "jobserver unavailable" warningMasahiro Yamada2015-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If "make kvmconfig" is run with "-j" option, a warning message, "jobserver unavailable: using -j1. Add `+' to parent make rule.", is displayed. $ make -s defconfig *** Default configuration is based on 'x86_64_defconfig' # # configuration written to .config # $ make -j8 kvmconfig Using ./.config as base Merging ./arch/x86/configs/kvm_guest.config [ snip ] # # merged configuration written to ./.config (needs make) # make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. scripts/kconfig/conf --oldconfig Kconfig [ snip ] # # configuration written to .config # Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | | kconfig: Remove unnecessary prototypes from headersMichal Marek2015-02-257-48/+40
| | | | | | | | | | | | | | | | Signed-off-by: Michal Marek <mmarek@suse.cz>
OpenPOWER on IntegriCloud