filelock: add a new locks_inode_context accessor function
[ Upstream commit 401a8b8f ] 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:Christoph Hellwig <hch@lst.de> Signed-off-by:
Jeff Layton <jlayton@kernel.org> Stable-dep-of: 77c67530 ("nfsd: use locks_inode_context helper") Signed-off-by:
Chuck Lever <chuck.lever@oracle.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please register or sign in to comment