nfsd: fix file memleak on client_opens_relaese
Subsystems (2)
PATCH 1/1 nfsd: fix file memleak on client_opens_relaese
seq_release should be called to free the allocated seq_file
Cc [email protected] # v5.3+
Signed-off-by Mahmoud Adam <[email protected]>
--- fs/nfsd/nfs4state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4state.c +1 -1
@@ -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 = {
--
2.40.1
Quoted 4 lines · Mahmoud Adam
seq_releaseshould be called to free the allocatedseq_fileCc [email protected] # v5.3+Signed-off-by Mahmoud Adam <[email protected]>
Fixes 78599c42ae3c ("nfsd4: add file to display list of client's opens")
Reviewed-by NeilBrown <[email protected]>
Thanks,
NeilBrown
Quoted 20 lines
--- fs/nfsd/nfs4state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/nfs4state.c +1
-2@@ -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 = { --2.40.1
Quoted 11 lines · NeilBrown
Quoted 4 lines · Mahmoud Adam
seq_releaseshould be called to free the allocatedseq_fileCc [email protected] # v5.3+Signed-off-by Mahmoud Adam <[email protected]>Fixes 78599c42ae3c ("nfsd4: add file to display list of client's opens")
Agreed, and pushed to nfsd-fixes.
Quoted 22 lines
Reviewed-by NeilBrown <[email protected]>Thanks,
NeilBrownQuoted 16 lines
---
fs/nfsd/nfs4state.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/nfs4state.c +1
-1@@ -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); }
Quoted 5 lines
Quoted 4 lines
fs/nfsd/nfs4state.c +0
-1static const struct file_operations client_states_fops = { --2.40.1
--
Chuck Lever
Quoted 22 lines · Mahmoud Adam
seq_releaseshould be called to free the allocatedseq_fileCc [email protected] # v5.3+Signed-off-by Mahmoud Adam <[email protected]>--- fs/nfsd/nfs4state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/nfs4state.c +1
-2@@ -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 = { --
Quoted 1 line
2.40.1
Reviewed-by Jeff Layton <[email protected]>