@@ -226,9 +226,9 @@ static int css_refcnt(struct cgroup_subsys_state *css)
226226}
227227
228228/* convenient tests for these bits */
229- static inline bool cgroup_is_removed (const struct cgroup * cgrp )
229+ static inline bool cgroup_is_dead (const struct cgroup * cgrp )
230230{
231- return test_bit (CGRP_REMOVED , & cgrp -> flags );
231+ return test_bit (CGRP_DEAD , & cgrp -> flags );
232232}
233233
234234/**
@@ -300,7 +300,7 @@ static inline struct cftype *__d_cft(struct dentry *dentry)
300300static bool cgroup_lock_live_group (struct cgroup * cgrp )
301301{
302302 mutex_lock (& cgroup_mutex );
303- if (cgroup_is_removed (cgrp )) {
303+ if (cgroup_is_dead (cgrp )) {
304304 mutex_unlock (& cgroup_mutex );
305305 return false;
306306 }
@@ -892,7 +892,7 @@ static void cgroup_diput(struct dentry *dentry, struct inode *inode)
892892 if (S_ISDIR (inode -> i_mode )) {
893893 struct cgroup * cgrp = dentry -> d_fsdata ;
894894
895- BUG_ON (!(cgroup_is_removed (cgrp )));
895+ BUG_ON (!(cgroup_is_dead (cgrp )));
896896 call_rcu (& cgrp -> rcu_head , cgroup_free_rcu );
897897 } else {
898898 struct cfent * cfe = __d_cfe (dentry );
@@ -2363,7 +2363,7 @@ static ssize_t cgroup_file_write(struct file *file, const char __user *buf,
23632363 struct cftype * cft = __d_cft (file -> f_dentry );
23642364 struct cgroup * cgrp = __d_cgrp (file -> f_dentry -> d_parent );
23652365
2366- if (cgroup_is_removed (cgrp ))
2366+ if (cgroup_is_dead (cgrp ))
23672367 return - ENODEV ;
23682368 if (cft -> write )
23692369 return cft -> write (cgrp , cft , file , buf , nbytes , ppos );
@@ -2408,7 +2408,7 @@ static ssize_t cgroup_file_read(struct file *file, char __user *buf,
24082408 struct cftype * cft = __d_cft (file -> f_dentry );
24092409 struct cgroup * cgrp = __d_cgrp (file -> f_dentry -> d_parent );
24102410
2411- if (cgroup_is_removed (cgrp ))
2411+ if (cgroup_is_dead (cgrp ))
24122412 return - ENODEV ;
24132413
24142414 if (cft -> read )
@@ -2831,7 +2831,7 @@ static void cgroup_cfts_commit(struct cgroup_subsys *ss,
28312831
28322832 mutex_lock (& inode -> i_mutex );
28332833 mutex_lock (& cgroup_mutex );
2834- if (!cgroup_is_removed (cgrp ))
2834+ if (!cgroup_is_dead (cgrp ))
28352835 cgroup_addrm_files (cgrp , ss , cfts , is_add );
28362836 mutex_unlock (& cgroup_mutex );
28372837 mutex_unlock (& inode -> i_mutex );
@@ -2999,14 +2999,14 @@ struct cgroup *cgroup_next_sibling(struct cgroup *pos)
29992999 /*
30003000 * @pos could already have been removed. Once a cgroup is removed,
30013001 * its ->sibling.next is no longer updated when its next sibling
3002- * changes. As CGRP_REMOVED is set on removal which is fully
3002+ * changes. As CGRP_DEAD is set on removal which is fully
30033003 * serialized, if we see it unasserted, it's guaranteed that the
30043004 * next sibling hasn't finished its grace period even if it's
30053005 * already removed, and thus safe to dereference from this RCU
30063006 * critical section. If ->sibling.next is inaccessible,
3007- * cgroup_is_removed () is guaranteed to be visible as %true here.
3007+ * cgroup_is_dead () is guaranteed to be visible as %true here.
30083008 */
3009- if (likely (!cgroup_is_removed (pos ))) {
3009+ if (likely (!cgroup_is_dead (pos ))) {
30103010 next = list_entry_rcu (pos -> sibling .next , struct cgroup , sibling );
30113011 if (& next -> sibling != & pos -> parent -> children )
30123012 return next ;
@@ -4383,7 +4383,7 @@ static int cgroup_destroy_locked(struct cgroup *cgrp)
43834383 * attempts fail thus maintaining the removal conditions verified
43844384 * above.
43854385 *
4386- * Note that CGRP_REMVOED clearing is depended upon by
4386+ * Note that CGRP_DEAD assertion is depended upon by
43874387 * cgroup_next_sibling() to resume iteration after dropping RCU
43884388 * read lock. See cgroup_next_sibling() for details.
43894389 */
@@ -4393,7 +4393,7 @@ static int cgroup_destroy_locked(struct cgroup *cgrp)
43934393 WARN_ON (atomic_read (& css -> refcnt ) < 0 );
43944394 atomic_add (CSS_DEACT_BIAS , & css -> refcnt );
43954395 }
4396- set_bit (CGRP_REMOVED , & cgrp -> flags );
4396+ set_bit (CGRP_DEAD , & cgrp -> flags );
43974397
43984398 /* tell subsystems to initate destruction */
43994399 for_each_subsys (cgrp -> root , ss )
@@ -5063,7 +5063,7 @@ static void check_for_release(struct cgroup *cgrp)
50635063 int need_schedule_work = 0 ;
50645064
50655065 raw_spin_lock (& release_list_lock );
5066- if (!cgroup_is_removed (cgrp ) &&
5066+ if (!cgroup_is_dead (cgrp ) &&
50675067 list_empty (& cgrp -> release_list )) {
50685068 list_add (& cgrp -> release_list , & release_list );
50695069 need_schedule_work = 1 ;
@@ -5209,9 +5209,7 @@ __setup("cgroup_disable=", cgroup_disable);
52095209 * Functons for CSS ID.
52105210 */
52115211
5212- /*
5213- *To get ID other than 0, this should be called when !cgroup_is_removed().
5214- */
5212+ /* to get ID other than 0, this should be called when !cgroup_is_dead() */
52155213unsigned short css_id (struct cgroup_subsys_state * css )
52165214{
52175215 struct css_id * cssid ;
0 commit comments