lkml.org 
[lkml]   [2024]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [syzbot] [fs?] WARNING in stashed_dentry_prune
Date
please test w in stashed_dentry_prune

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

diff --git a/fs/libfs.c b/fs/libfs.c
index 0d14ae808fcf..67dc503272eb 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -2013,6 +2013,8 @@ static struct dentry *prepare_anon_dentry(struct dentry **stashed,
if (!dentry)
return ERR_PTR(-ENOMEM);

+ /* Store address of location where dentry's supposed to be stashed. */
+ dentry->d_fsdata = stashed;
inode = new_inode_pseudo(sb);
if (!inode) {
dput(dentry);
@@ -2029,9 +2031,6 @@ static struct dentry *prepare_anon_dentry(struct dentry **stashed,
WARN_ON_ONCE(!S_ISREG(inode->i_mode));
WARN_ON_ONCE(!IS_IMMUTABLE(inode));

- /* Store address of location where dentry's supposed to be stashed. */
- dentry->d_fsdata = stashed;
-
/* @data is now owned by the fs */
d_instantiate(dentry, inode);
return dentry;

\
 
 \ /
  Last update: 2024-03-13 13:36    [W:0.089 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site