]> Git Repo - J-linux.git/commitdiff
qibfs: fix dentry leak
authorAl Viro <[email protected]>
Mon, 26 Feb 2024 04:58:42 +0000 (23:58 -0500)
committerAl Viro <[email protected]>
Mon, 26 Feb 2024 04:58:42 +0000 (23:58 -0500)
simple_recursive_removal() drops the pinning references to all positives
in subtree.  For the cases when its argument has been kept alive by
the pinning alone that's exactly the right thing to do, but here
the argument comes from dcache lookup, that needs to be balanced by
explicit dput().

Fixes: e41d237818598 "qib_fs: switch to simple_recursive_removal()"
Fucked-up-by: Al Viro <[email protected]>
Signed-off-by: Al Viro <[email protected]>
drivers/infiniband/hw/qib/qib_fs.c

index 455e966eeff3908052384ff5f0af1b98858bfdf4..b27791029fa9349e5c7b8f2a2c8458df9eed4073 100644 (file)
@@ -439,6 +439,7 @@ static int remove_device_files(struct super_block *sb,
                return PTR_ERR(dir);
        }
        simple_recursive_removal(dir, NULL);
+       dput(dir);
        return 0;
 }
 
This page took 0.052377 seconds and 4 git commands to generate.