summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'work.lookup' of ↵Linus Torvalds2018-06-0426-451/+293
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull dcache lookup cleanups from Al Viro: "Cleaning ->lookup() instances up - mostly d_splice_alias() conversions" * 'work.lookup' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (29 commits) switch the rest of procfs lookups to d_splice_alias() procfs: switch instantiate_t to d_splice_alias() don't bother with tid_fd_revalidate() in lookups proc_lookupfd_common(): don't bother with instantiate unless the file is open procfs: get rid of ancient BS in pid_revalidate() uses cifs_lookup(): switch to d_splice_alias() cifs_lookup(): cifs_get_inode_...() never returns 0 with *inode left NULL 9p: unify paths in v9fs_vfs_lookup() ncp_lookup(): use d_splice_alias() hfsplus: switch to d_splice_alias() hfs: don't allow mounting over .../rsrc hfs: use d_splice_alias() omfs_lookup(): report IO errors, use d_splice_alias() orangefs_lookup: simplify openpromfs: switch to d_splice_alias() xfs_vn_lookup: simplify a bit adfs_lookup: do not fail with ENOENT on negatives, use d_splice_alias() adfs_lookup_byname: .. *is* taken care of in fs/namei.c romfs_lookup: switch to d_splice_alias() qnx6_lookup: switch to d_splice_alias() ...
| * switch the rest of procfs lookups to d_splice_alias()Al Viro2018-05-262-5/+13
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * procfs: switch instantiate_t to d_splice_alias()Al Viro2018-05-264-79/+65
| | | | | | | | | | | | | | ... and get rid of pointless struct inode *dir argument of those, while we are at it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * don't bother with tid_fd_revalidate() in lookupsAl Viro2018-05-261-37/+44
| | | | | | | | | | | | | | what we want it for is actually updating inode metadata; take _that_ into a separate helper and use it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * proc_lookupfd_common(): don't bother with instantiate unless the file is openAl Viro2018-05-221-29/+34
| | | | | | | | | | | | | | | | | | | | ... and take the "check if file is open, pick ->f_mode" into a helper; tid_fd_revalidate() can use it. The next patch will get rid of tid_fd_revalidate() calls in instantiate callbacks. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * procfs: get rid of ancient BS in pid_revalidate() usesAl Viro2018-05-223-38/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First of all, calling pid_revalidate() in the end of <pid>/* lookups is *not* about closing any kind of races; that used to be true once upon a time, but these days those comments are actively misleading. Especially since pid_revalidate() doesn't even do d_drop() on failure anymore. It doesn't matter, anyway, since once pid_revalidate() starts returning false, ->d_delete() of those dentries starts saying "don't keep"; they won't get stuck in dcache any longer than they are pinned. These calls cannot be just removed, though - the side effect of pid_revalidate() (updating i_uid/i_gid/etc.) is what we are calling it for here. Let's separate the "update ownership" into a new helper (pid_update_inode()) and use it, both in lookups and in pid_revalidate() itself. The comments in pid_revalidate() are also out of date - they refer to the time when pid_revalidate() used to call d_drop() directly... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * cifs_lookup(): switch to d_splice_alias()Al Viro2018-05-221-18/+18
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * cifs_lookup(): cifs_get_inode_...() never returns 0 with *inode left NULLAl Viro2018-05-221-1/+1
| | | | | | | | | | | | not since 2004... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * 9p: unify paths in v9fs_vfs_lookup()Al Viro2018-05-221-20/+15
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * ncp_lookup(): use d_splice_alias()Al Viro2018-05-221-27/+15
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * hfsplus: switch to d_splice_alias()Al Viro2018-05-221-2/+1
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * hfs: don't allow mounting over .../rsrcAl Viro2018-05-221-0/+1
| | | | | | | | | | | | | | | | | | That's one case when unlink() destroys a subtree, thanks to "resource fork" idiocy. We might forcibly evict that shit on unlink(2), but for now let's just disallow overmounting; as it is, anything that plays games with those would leak mounts. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * hfs: use d_splice_alias()Al Viro2018-05-222-15/+8
| | | | | | | | | | | | code is simpler that way Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * omfs_lookup(): report IO errors, use d_splice_alias()Al Viro2018-05-221-4/+3
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * orangefs_lookup: simplifyAl Viro2018-05-221-56/+8
| | | | | | | | | | | | d_splice_alias() can handle NULL and ERR_PTR() for inode just fine... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * openpromfs: switch to d_splice_alias()Al Viro2018-05-221-2/+1
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * xfs_vn_lookup: simplify a bitAl Viro2018-05-221-8/+8
| | | | | | | | | | | | | | have all post-xfs_lookup() branches converge on d_splice_alias() Cc: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * adfs_lookup: do not fail with ENOENT on negatives, use d_splice_alias()Al Viro2018-05-221-5/+5
| | | | | | | | | | Cc: Russell King <linux@armlinux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * adfs_lookup_byname: .. *is* taken care of in fs/namei.cAl Viro2018-05-221-14/+0
| | | | | | | | | | Cc: Russell King <linux@armlinux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * romfs_lookup: switch to d_splice_alias()Al Viro2018-05-221-27/+9
| | | | | | | | | | | | ... and hash negative lookups Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * qnx6_lookup: switch to d_splice_alias()Al Viro2018-05-221-6/+2
| | | | | | | | | | | | ... and hash negative lookups Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * ubifs_lookup: use d_splice_alias()Al Viro2018-05-221-28/+15
| | | | | | | | | | | | | | code is simpler that way Acked-by: Richard Weinberger <richard@nod.at> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * sysv_lookup: use d_splice_alias()Al Viro2018-05-221-7/+2
| | | | | | | | | | | | | | code is simpler that way Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * qnx4_lookup: use d_splice_alias()Al Viro2018-05-221-6/+2
| | | | | | | | | | | | | | code is simpler that way Acked-by: Anders Larsen <al@alarsen.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * minix_lookup: use d_splice_alias()Al Viro2018-05-221-6/+2
| | | | | | | | | | | | code is simpler that way Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * freevxfs_lookup(): use d_splice_alias()Al Viro2018-05-221-6/+2
| | | | | | | | | | | | code is simpler that way Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * cramfs_lookup(): use d_splice_alias()Al Viro2018-05-221-4/+1
| | | | | | | | | | | | | | simpler code that way, actually Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * bfs_add_entry: pass name/len as qstr pointerAl Viro2018-05-221-11/+7
| | | | | | | | | | | | | | same story as with bfs_find_entry() Cc: "Tigran A. Aivazian" <aivazian.tigran@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * bfs_find_entry: pass name/len as qstr pointerAl Viro2018-05-221-10/+8
| | | | | | | | | | | | | | all callers feed something->name/something->len anyway Cc: "Tigran A. Aivazian" <aivazian.tigran@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * bfs_lookup(): use d_splice_alias()Al Viro2018-05-221-6/+1
| | | | | | | | | | | | | | code is actually simpler that way. Acked-by: "Tigran A. Aivazian" <aivazian.tigran@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Merge branch 'work.misc' into work.lookupAl Viro2018-05-2112-98/+45
| |\
* | \ Merge tag 'locks-v4.18-1' of ↵Linus Torvalds2018-06-042-9/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull fasync fix from Jeff Layton: "Just a single fix for a deadlock in the fasync handling code that Kirill observed while testing. The fix is to change the fa_lock to be rwlock_t, and use a read lock in kill_fasync_rcu" * tag 'locks-v4.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: fasync: Fix deadlock between task-context and interrupt-context kill_fasync()
| * | | fasync: Fix deadlock between task-context and interrupt-context kill_fasync()Kirill Tkhai2018-05-012-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I observed the following deadlock between them: [task 1] [task 2] [task 3] kill_fasync() mm_update_next_owner() copy_process() spin_lock_irqsave(&fa->fa_lock) read_lock(&tasklist_lock) write_lock_irq(&tasklist_lock) send_sigio() <IRQ> ... read_lock(&fown->lock) kill_fasync() ... read_lock(&tasklist_lock) spin_lock_irqsave(&fa->fa_lock) ... Task 1 can't acquire read locked tasklist_lock, since there is already task 3 expressed its wish to take the lock exclusive. Task 2 holds the read locked lock, but it can't take the spin lock. Also, there is possible another deadlock (which I haven't observed): [task 1] [task 2] f_getown() kill_fasync() read_lock(&f_own->lock) spin_lock_irqsave(&fa->fa_lock,) <IRQ> send_sigio() write_lock_irq(&f_own->lock) kill_fasync() read_lock(&fown->lock) spin_lock_irqsave(&fa->fa_lock,) Actually, we do not need exclusive fa->fa_lock in kill_fasync_rcu(), as it guarantees fa->fa_file->f_owner integrity only. It may seem, that it used to give a task a small possibility to receive two sequential signals, if there are two parallel kill_fasync() callers, and task handles the first signal fastly, but the behaviour won't become different, since there is exclusive sighand lock in do_send_sig_info(). The patch converts fa_lock into rwlock_t, and this fixes two above deadlocks, as rwlock is allowed to be taken from interrupt handler by qrwlock design. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Jeff Layton <jlayton@redhat.com>
* | | | Merge tag 'docs-4.18' of git://git.lwn.net/linuxLinus Torvalds2018-06-04166-2920/+5535
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull documentation updates from Jonathan Corbet: "There's been a fair amount of work in the docs tree this time around, including: - Extensive RST conversions and organizational work in the memory-management docs thanks to Mike Rapoport. - An update of Documentation/features from Andrea Parri and a script to keep it updated. - Various LICENSES updates from Thomas, along with a script to check SPDX tags. - Work to fix dangling references to documentation files; this involved a fair number of one-liner comment changes outside of Documentation/ ... and the usual list of documentation improvements, typo fixes, etc" * tag 'docs-4.18' of git://git.lwn.net/linux: (103 commits) Documentation: document hung_task_panic kernel parameter docs/admin-guide/mm: add high level concepts overview docs/vm: move ksm and transhuge from "user" to "internals" section. docs: Use the kerneldoc comments for memalloc_no*() doc: document scope NOFS, NOIO APIs docs: update kernel versions and dates in tables docs/vm: transhuge: split userspace bits to admin-guide/mm/transhuge docs/vm: transhuge: minor updates docs/vm: transhuge: change sections order Documentation: arm: clean up Marvell Berlin family info Documentation: gpio: driver: Fix a typo and some odd grammar docs: ranoops.rst: fix location of ramoops.txt scripts/documentation-file-ref-check: rewrite it in perl with auto-fix mode docs: uio-howto.rst: use a code block to solve a warning mm, THP, doc: Add document for thp_swpout/thp_swpout_fallback w1: w1_io.c: fix a kernel-doc warning Documentation/process/posting: wrap text at 80 cols docs: admin-guide: add cgroup-v2 documentation Revert "Documentation/features/vm: Remove arch support status file for 'pte_special'" Documentation: refcount-vs-atomic: Update reference to LKMM doc. ...
| * | | | Documentation: document hung_task_panic kernel parameterOmar Sandoval2018-05-291-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This parameter has been around since commit e162b39a368f ("softlockup: decouple hung tasks check from softlockup detection") in 2009 but was never documented. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | docs/admin-guide/mm: add high level concepts overviewMike Rapoport2018-05-292-0/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The are terms that seem obvious to the mm developers, but may be somewhat obscure for, say, less involved readers. The concepts overview can be seen as an "extended glossary" that introduces such terms to the readers of the kernel documentation. Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | docs/vm: move ksm and transhuge from "user" to "internals" section.Mike Rapoport2018-05-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the userspace interface description for KSM and THP was split to Documentation/admin-guide/mm, the remaining parts belong to the section describing MM internals. Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | docs: Use the kerneldoc comments for memalloc_no*()Jonathan Corbet2018-05-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have kerneldoc comments for memalloc_no{fs,io}_{save_restore}(), go ahead and pull them into the docs. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | doc: document scope NOFS, NOIO APIsMichal Hocko2018-05-293-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although the api is documented in the source code Ted has pointed out that there is no mention in the core-api Documentation and there are people looking there to find answers how to use a specific API. Requested-by: "Theodore Y. Ts'o" <tytso@mit.edu> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | docs: update kernel versions and dates in tablesTim Bird2018-05-231-34/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every once in a while, we should update the examples to reflect more recent kernel versions. Update the tables describing kernel releases, the merge window, and current longterm maintained kernel, from 2.6-era kernels to 4.x. Signed-off-by: Tim Bird <tim.bird@sony.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | docs/vm: transhuge: split userspace bits to admin-guide/mm/transhugeMike Rapoport2018-05-214-413/+423
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the administrative information for transparent huge pages is nicely separated, move it to its own page under the admin guide. Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | docs/vm: transhuge: minor updatesMike Rapoport2018-05-211-11/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some formatting changes and addition of a sentence introducing khugepaged Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | docs/vm: transhuge: change sections orderMike Rapoport2018-05-211-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | so that userspace interface and implementation description will be grouped together Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | Documentation: arm: clean up Marvell Berlin family infoThomas Hebb2018-05-161-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove dead links, make spacing consistent, and note that the family was acquired by Synaptics in 2017. Signed-off-by: Thomas Hebb <tommyhebb@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | Documentation: gpio: driver: Fix a typo and some odd grammarJonathan Neuschäfer2018-05-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | docs: ranoops.rst: fix location of ramoops.txtMauro Carvalho Chehab2018-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The location of the dt bindings file is wrong: it was probably badly renamed by some script. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | scripts/documentation-file-ref-check: rewrite it in perl with auto-fix modeMauro Carvalho Chehab2018-05-101-12/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original shell script works, but: 1) it is too slow; 2) it is hard to exclude rejex patterns Convert it to perl. Here, the new version is able to check the entire tree in less than a second (after cached): real 0m0,284s user 0m0,668s sys 0m0,778s The old version takes more than a minute to complete (also after cached): real 1m17,905s user 0m25,583s sys 0m55,334s It also produce less false-positives (if any). The new script also contains an auto-fix mode. Usually, file references get lost when they're moved to some other place and/or renamed to .rst. Add an experimental mode to auto-fix those. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | docs: uio-howto.rst: use a code block to solve a warningMauro Carvalho Chehab2018-05-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /devel/v4l/docs/Documentation/driver-api/uio-howto.rst:715: WARNING: Unexpected indentation. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | mm, THP, doc: Add document for thp_swpout/thp_swpout_fallbackHuang Ying2018-05-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add document for newly added thp_swpout, thp_swpout_fallback fields in /proc/vmstat. Signed-off-by: "Huang, Ying" <ying.huang@intel.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * | | | w1: w1_io.c: fix a kernel-doc warningMauro Carvalho Chehab2018-05-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a blank line to avoid this Sphinx warning: ./drivers/w1/w1_io.c:197: WARNING: Definition list ends without a blank line; unexpected unindent. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Jonathan Corbet <corbet@lwn.net>