• Jeff Layton's avatar
    filelock: add a new locks_inode_context accessor function · 401a8b8f
    Jeff Layton authored
    There are a number of places in the kernel that are accessing the
    inode->i_flctx field without smp_load_acquire. This is required to
    ensure that the caller doesn't see a partially-initialized structure.
    
    Add a new accessor function for it to make this clear and convert all of
    the relevant accesses in locks.c to use it. Also, convert
    locks_free_lock_context to use the helper as well instead of just doing
    a "bare" assignment.
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
    401a8b8f
locks.c 75.7 KB