summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-03-10 00:45:20 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2025-07-02 22:36:52 -0400
commitbad356bb50e64170f8af14a00797a04313846aeb (patch)
treeedfd247fbe231f9fd1d3a5fcc56895bd070732a5 /drivers/usb/gadget/function
parent1664a91025f9a85c4592864a4001c28100a2fca5 (diff)
functionfs, gadgetfs: use simple_recursive_removal()
usual mount leaks if something had been bound on top of disappearing files there. Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/usb/gadget/function')
-rw-r--r--drivers/usb/gadget/function/f_fs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 2dea9e42a0f8..ea5f0af1e8d2 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -2369,8 +2369,7 @@ static void ffs_epfiles_destroy(struct ffs_epfile *epfiles, unsigned count)
for (; count; --count, ++epfile) {
BUG_ON(mutex_is_locked(&epfile->mutex));
if (epfile->dentry) {
- d_delete(epfile->dentry);
- dput(epfile->dentry);
+ simple_recursive_removal(epfile->dentry, NULL);
epfile->dentry = NULL;
}
}