NFSv4: Ensure layout headers are RCU safe
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
@@ -59,14 +59,14 @@ ff_layout_alloc_layout_hdr(struct inode *inode, gfp_t gfp_flags)
|
||||
static void
|
||||
ff_layout_free_layout_hdr(struct pnfs_layout_hdr *lo)
|
||||
{
|
||||
struct nfs4_flexfile_layout *ffl = FF_LAYOUT_FROM_HDR(lo);
|
||||
struct nfs4_ff_layout_ds_err *err, *n;
|
||||
|
||||
list_for_each_entry_safe(err, n, &FF_LAYOUT_FROM_HDR(lo)->error_list,
|
||||
list) {
|
||||
list_for_each_entry_safe(err, n, &ffl->error_list, list) {
|
||||
list_del(&err->list);
|
||||
kfree(err);
|
||||
}
|
||||
kfree(FF_LAYOUT_FROM_HDR(lo));
|
||||
kfree_rcu(ffl, generic_hdr.plh_rcu);
|
||||
}
|
||||
|
||||
static int decode_pnfs_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid)
|
||||
|
Reference in New Issue
Block a user