summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/scanlog.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2013-04-13 00:48:49 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-01 17:29:45 -0400
commite8eeded3c5226fe420f9c6733cf5ada2faa3087a (patch)
treeeb7f78e3f1f2778451399760bdd77c9f79fbe89c /arch/powerpc/platforms/pseries/scanlog.c
parent819695abb762a625d2ef8f2a6fbf6debeec35b61 (diff)
ppc: Clean up rtas_flash driver somewhat
Clean up some of the problems with the rtas_flash driver: (1) It shouldn't fiddle with the internals of the procfs filesystem (altering pde->count). (2) If pid namespaces are in effect, then you can get multiple inodes connected to a single pde, thereby rendering the pde->count > 2 test useless. (3) The pde->count fudging doesn't work for forked, dup'd or cloned file descriptors, so add static mutexes and use them to wrap access to the driver through read, write and release methods. (4) The driver can only handle one device, so allocate most of the data previously attached to the pde->data as static variables instead (though allocate the validation data buffer with kmalloc). (5) We don't need to save the pde pointers as long as we have the filenames available for removal. (6) Don't try to multiplex what the update file read method does based on the filename. Instead provide separate file ops and split the function. Whilst we're at it, tabulate the procfile information and loop through it when creating or destroying them rather than manually coding each one. [Folded fixes from Vasant Hegde <hegdevasant@linux.vnet.ibm.com>] Signed-off-by: David Howells <dhowells@redhat.com> cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> cc: Paul Mackerras <paulus@samba.org> cc: Anton Blanchard <anton@samba.org> cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc/platforms/pseries/scanlog.c')
0 files changed, 0 insertions, 0 deletions