linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix braino in "9p: fix ->rename_sem exclusion"
@ 2025-02-03 21:17 Al Viro
  0 siblings, 0 replies; only message in thread
From: Al Viro @ 2025-02-03 21:17 UTC (permalink / raw)
  To: linux-fsdevel

->d_op can bloody well be NULL
    
Fucked-up-by: Al Viro <viro@zeniv.linux.org.uk>
Fixes: 30d61efe118c "9p: fix ->rename_sem exclusion"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/fs/dcache.c b/fs/dcache.c
index 903142b324e9..8a605681b26f 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2967,11 +2967,11 @@ static int __d_unalias(struct dentry *dentry, struct dentry *alias)
 		goto out_err;
 	m2 = &alias->d_parent->d_inode->i_rwsem;
 out_unalias:
-	if (alias->d_op->d_unalias_trylock &&
+	if (alias->d_op && alias->d_op->d_unalias_trylock &&
 	    !alias->d_op->d_unalias_trylock(alias))
 		goto out_err;
 	__d_move(alias, dentry, false);
-	if (alias->d_op->d_unalias_unlock)
+	if (alias->d_op && alias->d_op->d_unalias_unlock)
 		alias->d_op->d_unalias_unlock(alias);
 	ret = 0;
 out_err:

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-03 21:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-03 21:17 [PATCH] fix braino in "9p: fix ->rename_sem exclusion" Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).