]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
f2fs: add missing dput() when printing the donation list
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 2 Oct 2025 01:55:32 +0000 (01:55 +0000)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 3 Oct 2025 03:16:10 +0000 (03:16 +0000)
We missed to call dput() on the grabbed dentry.

Fixes: f1a49c1b112b ("f2fs: show the list of donation files")
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/sysfs.c

index 7992386fb9e63f3f468c0902a0a991b1d817742b..6d2a4fba68a29fb413e7a75a019dddcd745b46b0 100644 (file)
@@ -1845,6 +1845,7 @@ static int __maybe_unused donation_list_seq_show(struct seq_file *seq,
                                (loff_t)(fi->donate_end + 1) << (PAGE_SHIFT - 10),
                                (loff_t)inode->i_mapping->nrpages << (PAGE_SHIFT - 10));
 next:
+               dput(dentry);
                inode_unlock_shared(inode);
                iput(inode);
        }