[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201703250954.ICG12429.FHOMFLJOSOtFQV@I-love.SAKURA.ne.jp>
Date: Sat, 25 Mar 2017 09:54:02 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: mike.kravetz@...cle.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Cc: dvyukov@...gle.com, mhocko@...e.com, hillf.zj@...baba-inc.com,
dave.hansen@...ux.intel.com, akpm@...ux-foundation.org
Subject: Re: [PATCH] hugetlbfs: initialize shared policy as part of inode allocation
Mike Kravetz wrote:
> Any time after inode allocation, destroy_inode can be called. The
> hugetlbfs inode contains a shared_policy structure, and
> mpol_free_shared_policy is unconditionally called as part of
> hugetlbfs_destroy_inode. Initialize the policy as part of inode
> allocation so that any quick (error path) calls to destroy_inode
> will be handed an initialized policy.
I think you can as well do
- struct hugetlbfs_inode_info *info;
- info = HUGETLBFS_I(inode);
- mpol_shared_policy_init(&info->policy, NULL);
in hugetlbfs_get_root().
Powered by blists - more mailing lists