Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1609237

Re: [PATCH] hugetlbfs: initialize shared policy as part of inode allocation

From Mike Kravetz <mike.kravetz@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH] hugetlbfs: initialize shared policy as part of inode allocation
Date 2017-03-25 22:40 +0100
Message-ID <tp1zH-6GA-1@gated-at.bofh.it> (permalink)
References <toGEV-m5-15@gated-at.bofh.it> <toIdH-1mI-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 03/24/2017 05:54 PM, Tetsuo Handa wrote:
> 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().

Thank you.  You are correct.
After doing shared policy initialization at inode allocation time,
it is redundant here.

I will send v2 patch with this modification.

-- 
Mike Kravetz

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] hugetlbfs: initialize shared policy as part of inode allocation Mike Kravetz <mike.kravetz@oracle.com> - 2017-03-25 00:20 +0100
  Re: [PATCH] hugetlbfs: initialize shared policy as part of inode allocation Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-03-25 02:00 +0100
    Re: [PATCH] hugetlbfs: initialize shared policy as part of inode  allocation Mike Kravetz <mike.kravetz@oracle.com> - 2017-03-25 22:40 +0100

csiph-web