Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxx> --- fs/nfsd/nfs4pnfsd.c | 3 +++ fs/nfsd/pnfsd.h | 1 + 2 files changed, 4 insertions(+) diff --git a/fs/nfsd/nfs4pnfsd.c b/fs/nfsd/nfs4pnfsd.c index 6e0e9d1..b147427 100644 --- a/fs/nfsd/nfs4pnfsd.c +++ b/fs/nfsd/nfs4pnfsd.c @@ -132,6 +132,8 @@ struct sbid_tracker { kref_init(&new->ls_ref); nfsd4_init_stid(&new->ls_stid, clp, NFS4_LAYOUT_STID); INIT_LIST_HEAD(&new->ls_perfile); + get_nfs4_file(fp); /* released on destroy_layout_state */ + new->ls_file = fp; new->ls_roc = false; spin_lock(&layout_lock); list_add(&new->ls_perfile, &fp->fi_lo_states); @@ -157,6 +159,7 @@ struct sbid_tracker { list_del(&ls->ls_perfile); spin_unlock(&layout_lock); } + put_nfs4_file(ls->ls_file); kmem_cache_free(layout_state_slab, ls); } diff --git a/fs/nfsd/pnfsd.h b/fs/nfsd/pnfsd.h index 2507d31..6301c51 100644 --- a/fs/nfsd/pnfsd.h +++ b/fs/nfsd/pnfsd.h @@ -45,6 +45,7 @@ struct nfs4_layout_state { struct nfs4_stid ls_stid; /* must be first field */ struct kref ls_ref; struct list_head ls_perfile; + struct nfs4_file *ls_file; bool ls_roc; }; -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html