Commit 71cade8
committed
eventfs: Do not invalidate dentry in create_file/dir_dentry()
With the call to simple_recursive_removal() on the entire eventfs sub
system when the directory is removed, it performs the d_invalidate on all
the dentries when it is removed. There's no need to do clean ups when a
dentry is being created while the directory is being deleted.
As dentries are cleaned up by the simpler_recursive_removal(), trying to
do d_invalidate() in these functions will cause the dentry to be
invalidated twice, and crash the kernel.
Link: https://lore.kernel.org/all/20231116123016.140576-1-naresh.kamboju@linaro.org/
Link: https://lkml.kernel.org/r/20231120235154.422970988@goodmis.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Fixes: 407c672 ("eventfs: Use simple_recursive_removal() to clean up dentries")
Reported-by: Mark Rutland <mark.rutland@arm.com>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>1 parent 88903da commit 71cade8
1 file changed
Lines changed: 6 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
330 | 329 | | |
331 | 330 | | |
332 | 331 | | |
| |||
389 | 388 | | |
390 | 389 | | |
391 | 390 | | |
392 | | - | |
| 391 | + | |
393 | 392 | | |
394 | 393 | | |
395 | 394 | | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
| 395 | + | |
400 | 396 | | |
401 | 397 | | |
402 | | - | |
| 398 | + | |
403 | 399 | | |
404 | 400 | | |
405 | 401 | | |
| |||
439 | 435 | | |
440 | 436 | | |
441 | 437 | | |
442 | | - | |
443 | 438 | | |
444 | 439 | | |
445 | 440 | | |
| |||
495 | 490 | | |
496 | 491 | | |
497 | 492 | | |
498 | | - | |
| 493 | + | |
499 | 494 | | |
500 | 495 | | |
501 | | - | |
502 | | - | |
503 | 496 | | |
504 | | - | |
| 497 | + | |
505 | 498 | | |
506 | 499 | | |
507 | | - | |
| 500 | + | |
508 | 501 | | |
509 | 502 | | |
510 | 503 | | |
| |||
0 commit comments