summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'work.misc' of ↵Linus Torvalds2018-06-0413-118/+69
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "Misc bits and pieces not fitting into anything more specific" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: vfs: delete unnecessary assignment in vfs_listxattr Documentation: filesystems: update filesystem locking documentation vfs: namei: use path_equal() in follow_dotdot() fs.h: fix outdated comment about file flags __inode_security_revalidate() never gets NULL opt_dentry make xattr_getsecurity() static vfat: simplify checks in vfat_lookup() get rid of dead code in d_find_alias() it's SB_BORN, not MS_BORN... msdos_rmdir(): kill BS comment remove rpc_rmdir() fs: avoid fdput() after failed fdget() in vfs_dedupe_file_range()
| * vfs: delete unnecessary assignment in vfs_listxattrChengguang Xu2018-05-291-1/+0
| | | | | | | | | | | | | | It seems the first error assignment in if branch is redundant. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Documentation: filesystems: update filesystem locking documentationSean Anderson2018-05-261-19/+24
| | | | | | | | | | | | | | | | | | | | Documentation/filesystems/Locking no longer reflects current locking semantics. i_mutex is no longer used for locking, and has been superseded by i_rwsem. Additionally, ->iterate_shared() was not documented. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: namei: use path_equal() in follow_dotdot()Danilo Krummrich2018-05-171-3/+1
| | | | | | | | | | | | | | Use path_equal() to detect whether we're already in root. Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fs.h: fix outdated comment about file flagsLi Qiang2018-05-171-1/+1
| | | | | | | | | | | | | | | | The __dentry_open function was removed in commit <2a027e7a18738>("fold __dentry_open() into its sole caller"). Signed-off-by: Li Qiang <liq3ea@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * __inode_security_revalidate() never gets NULL opt_dentryAl Viro2018-05-141-4/+3
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * make xattr_getsecurity() staticAl Viro2018-05-142-3/+1
| | | | | | | | | | | | many years overdue... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfat: simplify checks in vfat_lookup()Al Viro2018-05-131-12/+1
| | | | | | | | | | | | | | | | | | vfat_d_anon_disconn() is called only if alias->d_parent is equal to dentry->d_parent *and* it returns false unless alias->d_parent == alias. But in that case alias is the directory we are doing lookup in, and d_splice_alias() would've done the right thing. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * get rid of dead code in d_find_alias()Al Viro2018-05-131-49/+34
| | | | | | | | | | | | | | | | | | | | All "try disconnected alias if nothing else fits" logics in d_find_alias() got accidentally disabled by Neil a while ago; for most of the callers it was the right thing to do, so fixes belong in few callers that *do* want disconnected aliases. This just takes the now-dead code in d_find_alias() out. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * it's SB_BORN, not MS_BORN...Al Viro2018-05-101-1/+1
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * msdos_rmdir(): kill BS commentAl Viro2018-04-201-4/+0
| | | | | | | | | | | | | | it hadn't been checking for "busy" since 2.3.99-something and removing that leaves us with "check if it's empty" followed by call of fat_dir_emtpy() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * remove rpc_rmdir()Al Viro2018-04-162-18/+0
| | | | | | | | | | | | no users since 2014... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fs: avoid fdput() after failed fdget() in vfs_dedupe_file_range()Zev Weiss2018-04-151-3/+3
| | | | | | | | | | | | | | | | | | It's a fairly inconsequential bug, since fdput() won't actually try to fput() the file due to fd.flags (and thus FDPUT_FPUT) being zero in the failure case, but most other vfs code takes steps to avoid this. Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | Merge branch 'hch.procfs' of ↵Linus Torvalds2018-06-04266-6032/+1229
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull procfs updates from Al Viro: "Christoph's proc_create_... cleanups series" * 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (44 commits) xfs, proc: hide unused xfs procfs helpers isdn/gigaset: add back gigaset_procinfo assignment proc: update SIZEOF_PDE_INLINE_NAME for the new pde fields tty: replace ->proc_fops with ->proc_show ide: replace ->proc_fops with ->proc_show ide: remove ide_driver_proc_write isdn: replace ->proc_fops with ->proc_show atm: switch to proc_create_seq_private atm: simplify procfs code bluetooth: switch to proc_create_seq_data netfilter/x_tables: switch to proc_create_seq_private netfilter/xt_hashlimit: switch to proc_create_{seq,single}_data neigh: switch to proc_create_seq_data hostap: switch to proc_create_{seq,single}_data bonding: switch to proc_create_seq_data rtc/proc: switch to proc_create_single_data drbd: switch to proc_create_single resource: switch to proc_create_seq_data staging/rtl8192u: simplify procfs code jfs: simplify procfs code ...
| * | xfs, proc: hide unused xfs procfs helpersArnd Bergmann2018-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These two functions now trigger a warning when CONFIG_PROC_FS is disabled: fs/xfs/xfs_stats.c:128:12: error: 'xqmstat_proc_show' defined but not used [-Werror=unused-function] static int xqmstat_proc_show(struct seq_file *m, void *v) ^~~~~~~~~~~~~~~~~ fs/xfs/xfs_stats.c:118:12: error: 'xqm_proc_show' defined but not used [-Werror=unused-function] static int xqm_proc_show(struct seq_file *m, void *v) ^~~~~~~~~~~~~ Previously, they were referenced from an unused 'static const' structure, which is silently dropped by gcc. We can address the warning by adding the same #ifdef around them that hides the reference. Fixes: 3f3942aca6da ("proc: introduce proc_create_single{,_data}") Cc: Christoph Hellwig <hch@lst.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | isdn/gigaset: add back gigaset_procinfo assignmentChristoph Hellwig2018-05-171-0/+1
| | | | | | | | | | | | | | | | | | Fixes: 2cd1f0ddbb56 ("isdn: replace ->proc_fops with ->proc_show") Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | proc: update SIZEOF_PDE_INLINE_NAME for the new pde fieldsChristoph Hellwig2018-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | This makes Alexey happy and Al groan. Based on a patch from Alexey Dobriyan. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | tty: replace ->proc_fops with ->proc_showChristoph Hellwig2018-05-1614-172/+16
| | | | | | | | | | | | | | | | | | | | | | | | Just set up the show callback in the tty_operations, and use proc_create_single_data to create the file without additional boilerplace code. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | ide: replace ->proc_fops with ->proc_showChristoph Hellwig2018-05-166-222/+31
| | | | | | | | | | | | | | | | | | | | | | | | Just set up the show callback in the tty_operations, and use proc_create_single_data to create the file without additional boilerplace code. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | ide: remove ide_driver_proc_writeChristoph Hellwig2018-05-161-46/+0
| | | | | | | | | | | | | | | | | | | | | | | | The driver proc file hasn't been writeable for a long time, so this is just dead code. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
| * | isdn: replace ->proc_fops with ->proc_showChristoph Hellwig2018-05-1615-110/+20
| | | | | | | | | | | | | | | | | | And switch to proc_create_single_data. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | atm: switch to proc_create_seq_privateChristoph Hellwig2018-05-161-59/+13
| | | | | | | | | | | | | | | | | | And remove proc boilerplate code. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | atm: simplify procfs codeChristoph Hellwig2018-05-161-58/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Also don't bother handling proc_create* failures - the driver works perfectly fine without the proc files, and the cleanup will handle missing files gracefully. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | bluetooth: switch to proc_create_seq_dataChristoph Hellwig2018-05-161-35/+5
| | | | | | | | | | | | | | | | | | | | | And use proc private data directly instead of doing a detour through seq->private and private state. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | netfilter/x_tables: switch to proc_create_seq_privateChristoph Hellwig2018-05-161-36/+6
| | | | | | | | | | | | | | | | | | And remove proc boilerplate code. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | netfilter/xt_hashlimit: switch to proc_create_{seq,single}_dataChristoph Hellwig2018-05-161-74/+18
| | | | | | | | | | | | | | | | | | | | | And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | neigh: switch to proc_create_seq_dataChristoph Hellwig2018-05-161-25/+6
| | | | | | | | | | | | | | | | | | | | | And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | hostap: switch to proc_create_{seq,single}_dataChristoph Hellwig2018-05-163-191/+39
| | | | | | | | | | | | | | | | | | | | | And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | bonding: switch to proc_create_seq_dataChristoph Hellwig2018-05-161-30/+6
| | | | | | | | | | | | | | | | | | | | | And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | rtc/proc: switch to proc_create_single_dataChristoph Hellwig2018-05-161-31/+2
| | | | | | | | | | | | | | | | | | | | | | | | And stop trying to get a reference on the submodule, procfs code deals with release after an unloaded module and thus removed proc entry. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * | drbd: switch to proc_create_singleChristoph Hellwig2018-05-163-35/+4
| | | | | | | | | | | | | | | | | | | | | And stop messing with try_module_get on THIS_MODULE, which doesn't make any sense here. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | resource: switch to proc_create_seq_dataChristoph Hellwig2018-05-161-38/+5
| | | | | | | | | | | | | | | | | | And use the root resource directly from the proc private data. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | staging/rtl8192u: simplify procfs codeChristoph Hellwig2018-05-161-53/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unwind the registration loop into individual calls. Switch to use proc_create_single where applicable. Also don't bother handling proc_create* failures - the driver works perfectly fine without the proc files, and the cleanup will handle missing files gracefully. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | jfs: simplify procfs codeChristoph Hellwig2018-05-166-99/+24
| | | | | | | | | | | | | | | | | | | | | | | | Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | ext4: simplify procfs codeChristoph Hellwig2018-05-163-66/+14
| | | | | | | | | | | | | | | | | | | | | | | | Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | afs: simplify procfs codeChristoph Hellwig2018-05-161-119/+15
| | | | | | | | | | | | | | | | | | | | | | | | Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | sg: simplify procfs codeChristoph Hellwig2018-05-161-112/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Also don't bother handling proc_create* failures - the driver works perfectly fine without the proc files, and the cleanup will handle missing files gracefully. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | megaraid: simplify procfs codeChristoph Hellwig2018-05-162-116/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_single. Also don't bother handling proc_create* failures - the driver works perfectly fine without the proc files, and the cleanup will handle missing files gracefully. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | sgi-gru: simplify procfs codeChristoph Hellwig2018-05-161-67/+14
| | | | | | | | | | | | | | | | | | | | | | | | Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | acpi/battery: simplify procfs codeChristoph Hellwig2018-05-161-95/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * | proc: introduce proc_create_net_singleChristoph Hellwig2018-05-1613-307/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | Variant of proc_create_data that directly take a seq_file show callback and deals with network namespaces in ->open and ->release. All callers of proc_create + single_open_net converted over, and single_{open,release}_net are removed entirely. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | proc: introduce proc_create_net{,_data}Christoph Hellwig2018-05-1657-939/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | Variants of proc_create{,_data} that directly take a struct seq_operations and deal with network namespaces in ->open and ->release. All callers of proc_create + seq_open_net converted over, and seq_{open,release}_net are removed entirely. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | net: move seq_file_single_net to <linux/seq_file_net.h>Christoph Hellwig2018-05-162-12/+13
| | | | | | | | | | | | | | | | | | | | | This helper deals with single_{open,release}_net internals and thus belongs here. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | netfilter/x_tables: simplify ѕeq_file codeChristoph Hellwig2018-05-161-28/+11
| | | | | | | | | | | | | | | | | | | | | Just use the address family from the proc private data instead of copying it into per-file data. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | net/kcm: simplify proc registrationChristoph Hellwig2018-05-161-54/+17
| | | | | | | | | | | | | | | | | | | | | Remove a couple indirections to make the code look like most other protocols. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | ipv6/flowlabel: simplify pid namespace lookupChristoph Hellwig2018-05-161-23/+6
| | | | | | | | | | | | | | | | | | | | | | | | The code should be using the pid namespace from the procfs mount instead of trying to look it up during open. Suggested-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | ipv{4,6}/raw: simplify ѕeq_file codeChristoph Hellwig2018-05-163-30/+16
| | | | | | | | | | | | | | | | | | | | | Pass the hashtable to the proc private data instead of copying it into the per-file private data. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | ipv{4,6}/ping: simplify proc file creationChristoph Hellwig2018-05-163-59/+37
| | | | | | | | | | | | | | | | | | | | | Remove the pointless ping_seq_afinfo indirection and make the code look like most other protocols. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | ipv{4,6}/tcp: simplify procfs registrationChristoph Hellwig2018-05-163-70/+53
| | | | | | | | | | | | | | | | | | | | | Avoid most of the afinfo indirections and just call the proc helpers directly. Signed-off-by: Christoph Hellwig <hch@lst.de>
| * | ipv{4,6}/udp{,lite}: simplify proc registrationChristoph Hellwig2018-05-165-113/+78
| | | | | | | | | | | | | | | | | | | | | Remove a couple indirections to make the code look like most other protocols. Signed-off-by: Christoph Hellwig <hch@lst.de>