lkml.org 
[lkml]   [2017]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] hugetlbfs: initialize shared policy as part of inode allocation
From
Date
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().

\
 
 \ /
  Last update: 2017-03-25 01:54    [W:0.043 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site