提交 97a728f5 编写于 作者: T Trond Myklebust

NFS/pnfs: Fix dereference of layout cred in pnfs_layoutcommit_inode()

Ensure that the dereference of the layout cred is atomic with the
stateid.
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 fc51b1cf
......@@ -3137,10 +3137,10 @@ pnfs_layoutcommit_inode(struct inode *inode, bool sync)
end_pos = nfsi->layout->plh_lwb;
nfs4_stateid_copy(&data->args.stateid, &nfsi->layout->plh_stateid);
data->cred = get_cred(nfsi->layout->plh_lc_cred);
spin_unlock(&inode->i_lock);
data->args.inode = inode;
data->cred = get_cred(nfsi->layout->plh_lc_cred);
nfs_fattr_init(&data->fattr);
data->args.bitmask = NFS_SERVER(inode)->cache_consistency_bitmask;
data->res.fattr = &data->fattr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册