summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMahmoud Adam <mngyadam@amazon.com>2023-11-10 19:21:04 +0100
committerChuck Lever <chuck.lever@oracle.com>2023-11-17 15:12:39 -0500
commitbc1b5acb40201a0746d68a7d7cfc141899937f4f (patch)
tree03f7536b6d2bb60ff0a2ae474f46764cbe58532f
parent3fd2ca5be07f6a43211591a45b43df9e7b6eba00 (diff)
nfsd: fix file memleak on client_opens_release
seq_release should be called to free the allocated seq_file Cc: stable@vger.kernel.org # v5.3+ Signed-off-by: Mahmoud Adam <mngyadam@amazon.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Fixes: 78599c42ae3c ("nfsd4: add file to display list of client's opens") Reviewed-by: NeilBrown <neilb@suse.de> Tested-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-rw-r--r--fs/nfsd/nfs4state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 65fd5510323a..3709e58f0a4a 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2804,7 +2804,7 @@ static int client_opens_release(struct inode *inode, struct file *file)
/* XXX: alternatively, we could get/drop in seq start/stop */
drop_client(clp);
- return 0;
+ return seq_release(inode, file);
}
static const struct file_operations client_states_fops = {