1. 02 5月, 2013 3 次提交
    • D
      ppc: Clean up scanlog · 4c237820
      David Howells 提交于
      Clean up the pseries scanlog driver's use of procfs:
      
       (1) Don't need to save the proc_dir_entry pointer as we have the filename to
           remove with.
      
       (2) Save the scan log buffer pointer in a static variable (there is only one
           of it) and don't save it in the PDE (which doesn't have a destructor).
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      cc: Paul Mackerras <paulus@samba.org>
      cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      4c237820
    • D
      ppc: Clean up rtas_flash driver somewhat · e8eeded3
      David Howells 提交于
      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: NDavid 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: NAl Viro <viro@zeniv.linux.org.uk>
      e8eeded3
    • D
      proc: Supply PDE attribute setting accessor functions · 271a15ea
      David Howells 提交于
      Supply accessor functions to set attributes in proc_dir_entry structs.
      
      The following are supplied: proc_set_size() and proc_set_user().
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      cc: linuxppc-dev@lists.ozlabs.org
      cc: linux-media@vger.kernel.org
      cc: netdev@vger.kernel.org
      cc: linux-wireless@vger.kernel.org
      cc: linux-pci@vger.kernel.org
      cc: netfilter-devel@vger.kernel.org
      cc: alsa-devel@alsa-project.org
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      271a15ea
  2. 01 5月, 2013 37 次提交