• Li Zefan's avatar
    cgroups: remove some redundant NULL checks · 75139b82
    Li Zefan authored
    - In cgroup_clone(), if vfs_mkdir() returns successfully,
      dentry->d_fsdata will be the pointer to the newly created
      cgroup and won't be NULL.
    
    - a cgroup file's dentry->d_fsdata won't be NULL, guaranteed
      by cgroup_add_file().
    
    - When walking through the subsystems of a cgroup_fs (using
      for_each_subsys), cgrp->subsys[ss->subsys_id] won't be NULL,
      guaranteed by cgroup_create().
    
    (Also remove 2 unused variables in cgroup_rmdir().
    Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
    Cc: Paul Menage <menage@google.com>
    Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Balbir Singh <balbir@in.ibm.com>
    Cc: Pavel Emelyanov <xemul@openvz.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    75139b82
cgroup.c 81.7 KB