Skip to contentSkip to conversation

f2fs: add missing dput() when printing the donation list

PATCH Applied Jaegeuk Kim 4 participants 4 messages Oct 2, 2025 – Oct 3, 2025 F2FS file system

lore
Share & tools
lore

Jaegeuk Kim

author maintainer
#0 lore raw

PATCH 1/1 f2fs: add missing dput() when printing the donation list

We missed to call dput() on the grabbed dentry.

Fixes f1a49c1b112b ("f2fs: show the list of donation files")
---
 fs/f2fs/sysfs.c | 1 +
 1 file changed, 1 insertion(+)
fs/f2fs/sysfs.c +1 -0
index 7992386fb9e6..6d2a4fba68a2 100644
@@ -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);
 	}
Signature · 1 line
2.51.0.618.g983fd99d29-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · On Wed, Oct 1, 2025 at 6:59 PM Jaegeuk Kim via Linux-f2fs-devel…

We missed to call dput() on the grabbed dentry.

Fixes f1a49c1b112b ("f2fs: show the list of donation files")
---
 fs/f2fs/sysfs.c | 1 +
 1 file changed, 1 insertion(+)
fs/f2fs/sysfs.c +1 -1
index 7992386fb9e6..6d2a4fba68a2 100644
@@ -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);
        }
--
Quoted 3 lines

2.51.0.618.g983fd99d29-goog

Thanks,

Quoted 5 lines

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

#2 lore raw
In reply to Jaegeuk Kim
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:

Quoted 7 lines · On Thu, 2 Oct 2025 01:56:45 +0000 you wrote:

We missed to call dput() on the grabbed dentry.

Fixes f1a49c1b112b ("f2fs: show the list of donation files")
---
 fs/f2fs/sysfs.c | 1 +
 1 file changed, 1 insertion(+)

Here is the summary with links:
- [f2fs-dev] f2fs: add missing dput() when printing the donation list

    https://git.kernel.org/jaegeuk/f2fs/c/e34b65fd0c7f

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html