linux-sg2042/fs/kernfs
Tejun Heo 988cd7afb3 kernfs: remove kernfs_addrm_cxt
kernfs_addrm_cxt and the accompanying kernfs_addrm_start/finish() were
added because there were operations which should be performed outside
kernfs_mutex after adding and removing kernfs_nodes.  The necessary
operations were recorded in kernfs_addrm_cxt and performed by
kernfs_addrm_finish(); however, after the recent changes which
relocated deactivation and unmapping so that they're performed
directly during removal, the only operation kernfs_addrm_finish()
performs is kernfs_put(), which can be moved inside the removal path
too.

This patch moves the kernfs_put() of the base ref to __kernfs_remove()
and remove kernfs_addrm_cxt and kernfs_addrm_start/finish().

* kernfs_add_one() is updated to grab and release kernfs_mutex itself.
  sysfs_addrm_start/finish() invocations around it are removed from
  all users.

* __kernfs_remove() puts an unlinked node directly instead of chaining
  it to kernfs_addrm_cxt.  Its callers are updated to grab and release
  kernfs_mutex instead of calling kernfs_addrm_start/finish() around
  it.

v2: Rebased on top of "kernfs: associate a new kernfs_node with its
    parent on creation" which dropped @parent from kernfs_add_one().

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 15:42:40 -08:00
..
Makefile sysfs, kernfs: add skeletons for kernfs 2013-11-27 13:28:24 -08:00
dir.c kernfs: remove kernfs_addrm_cxt 2014-02-07 15:42:40 -08:00
file.c kernfs: remove kernfs_addrm_cxt 2014-02-07 15:42:40 -08:00
inode.c kernfs: s/sysfs/kernfs/ in internal functions and whatever is left 2013-12-11 17:39:20 -08:00
kernfs-internal.h kernfs: remove kernfs_addrm_cxt 2014-02-07 15:42:40 -08:00
mount.c kernfs: s/sysfs/kernfs/ in internal functions and whatever is left 2013-12-11 17:39:20 -08:00
symlink.c kernfs: remove kernfs_addrm_cxt 2014-02-07 15:42:40 -08:00