From: Mahmoud Adam Date: Fri, 10 Nov 2023 18:21:04 +0000 (+0100) Subject: nfsd: fix file memleak on client_opens_release X-Git-Tag: microblaze-v6.10~714^2~9 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=bc1b5acb40201a0746d68a7d7cfc141899937f4f;p=linux-2.6-microblaze.git 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 Reviewed-by: Jeff Layton Fixes: 78599c42ae3c ("nfsd4: add file to display list of client's opens") Reviewed-by: NeilBrown Tested-by: Jeff Layton Signed-off-by: Chuck Lever --- 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 = {