[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51FF14C5.4040003@huawei.com>
Date: Mon, 5 Aug 2013 10:58:13 +0800
From: Li Zefan <lizefan@...wei.com>
To: Tejun Heo <tj@...nel.org>
CC: <hannes@...xchg.org>, <mhocko@...e.cz>, <bsingharora@...il.com>,
<kamezawa.hiroyu@...fujitsu.com>, <cgroups@...r.kernel.org>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/5] cgroup: export __cgroup_from_dentry() and __cgroup_dput()
> +struct cgroup *__cgroup_from_dentry(struct dentry *dentry, struct cftype **cftp)
> {
> - if (file_inode(file)->i_fop != &cgroup_file_operations)
> - return ERR_PTR(-EINVAL);
> - return __d_cft(file->f_dentry);
> + if (!dentry->d_inode ||
> + dentry->d_inode->i_op != &cgroup_file_inode_operations)
> + return NULL;
> +
> + if (cftp)
> + *cftp = __d_cft(dentry);
> + return __d_cgrp(dentry->d_parent);
> }
> +EXPORT_SYMBOL_GPL(__cgroup_from_dentry);
As we don't expect new users, why export this symbol? memcg can't be
built as a module.
>
> static int cgroup_create_file(struct dentry *dentry, umode_t mode,
> struct super_block *sb)
> @@ -3953,7 +3956,7 @@ static int cgroup_write_notify_on_release(struct cgroup_subsys_state *css,
> *
> * That's why we hold a reference before dput() and drop it right after.
> */
> -static void cgroup_dput(struct cgroup *cgrp)
> +void __cgroup_dput(struct cgroup *cgrp)
> {
> struct super_block *sb = cgrp->root->sb;
>
> @@ -3961,6 +3964,7 @@ static void cgroup_dput(struct cgroup *cgrp)
> dput(cgrp->dentry);
> deactivate_super(sb);
> }
> +EXPORT_SYMBOL_GPL(__cgroup_dput);
ditto
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists