From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: [PATCH 08/10] cgroup: relocate __d_cgrp() and __d_cft() Date: Fri, 16 Mar 2012 16:36:01 -0700 Message-ID: <1331940963-15756-9-git-send-email-tj@kernel.org> References: <1331940963-15756-1-git-send-email-tj@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=/IHU1iHqaoS29YzIe4iOhU99xZ5UXltsX+T0OSjJ51Y=; b=O3OExLFfjFcCWcIQUNpl1PQ/oILjmYXpKkFnoeRMzk4HwtR36Yv9AdlBcINj8Fm98V qKQOWcjJomPZXEv8u94OTlVnk1lyhrjNkPPzHpZVhV8IDMpcealit6nfXk7QBLuRKwQo 5Xx4xSdCHrs3JxYurE921p3SntTglYZI14pv4MoBQtG7MJH1z0R/GGcKAYdRDxLpHBIo mkZ6ZTGgUC0rDaXd7I8zt2giiWDTcKk9lNAQmHYcnL1cFvtsaUt8FKvXLNMfrSv0NCv8 af+NAjLnzsG198fa4DC7x9M1lXTBB39cRF+F+WTTJFtFTFR8QMG+m8Xk07D88FivCpO0 UGtA== In-Reply-To: <1331940963-15756-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org, lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Tejun Heo , fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, ctalbott-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, rni-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org Move the two macros upwards as they'll be used earlier in the file. Signed-off-by: Tejun Heo --- kernel/cgroup.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 33383cb..765d9f5 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -292,6 +292,16 @@ list_for_each_entry(_ss, &_root->subsys_list, sibling) #define for_each_active_root(_root) \ list_for_each_entry(_root, &roots, root_list) +static inline struct cgroup *__d_cgrp(struct dentry *dentry) +{ + return dentry->d_fsdata; +} + +static inline struct cftype *__d_cft(struct dentry *dentry) +{ + return dentry->d_fsdata; +} + /* the list of cgroups eligible for automatic release. Protected by * release_list_lock */ static LIST_HEAD(release_list); @@ -1718,16 +1728,6 @@ static struct file_system_type cgroup_fs_type = { static struct kobject *cgroup_kobj; -static inline struct cgroup *__d_cgrp(struct dentry *dentry) -{ - return dentry->d_fsdata; -} - -static inline struct cftype *__d_cft(struct dentry *dentry) -{ - return dentry->d_fsdata; -} - /** * cgroup_path - generate the path of a cgroup * @cgrp: the cgroup in question -- 1.7.7.3