@@ -133,6 +133,7 @@ struct sbid_tracker {
new->ls_stid.sc_type = NFS4_LAYOUT_STID;
INIT_LIST_HEAD(&new->ls_perclnt);
INIT_LIST_HEAD(&new->ls_perfile);
+ INIT_LIST_HEAD(&new->ls_layouts);
new->ls_client = clp;
get_nfs4_file(fp); /* released on destroy_layout_state */
new->ls_file = fp;
@@ -281,6 +282,7 @@ static void update_layout_stateid_locked(struct nfs4_layout_state *ls, stateid_t
lp->lo_state = ls;
spin_lock(&layout_lock);
update_layout_stateid_locked(ls, stateid);
+ list_add_tail(&lp->lo_perstate, &ls->ls_layouts);
spin_unlock(&layout_lock);
dprintk("pNFS %s end\n", __func__);
}
@@ -48,6 +48,7 @@ struct nfs4_layout_state {
struct nfs4_client *ls_client;
struct list_head ls_perfile;
struct nfs4_file *ls_file;
+ struct list_head ls_layouts;
};
/* outstanding layout */
Signed-off-by: Benny Halevy <bhalevy@primarydata.com> --- fs/nfsd/nfs4pnfsd.c | 2 ++ fs/nfsd/pnfsd.h | 1 + 2 files changed, 3 insertions(+)