diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 43e66fc1b90dc6ae4a963784faa0a967805c2ac0..028ae55e5f7a9e8a2a3346f0b74360057691caa8 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1037,6 +1037,7 @@ static void free_ol_stateid_reaplist(struct list_head *reaplist) { struct nfs4_ol_stateid *stp; + struct nfs4_file *fp; might_sleep(); @@ -1044,7 +1045,10 @@ free_ol_stateid_reaplist(struct list_head *reaplist) stp = list_first_entry(reaplist, struct nfs4_ol_stateid, st_locks); list_del(&stp->st_locks); + fp = stp->st_stid.sc_file; stp->st_stid.sc_free(&stp->st_stid); + if (fp) + put_nfs4_file(fp); } }