You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
fs: rcu-walk aware d_revalidate method
Require filesystems be aware of .d_revalidate being called in rcu-walk mode (nd->flags & LOOKUP_RCU). For now do a simple push down, returning -ECHILD from all implementations. Signed-off-by: Nick Piggin <npiggin@kernel.dk>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <linux/sysctl.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/security.h>
|
||||
#include <linux/namei.h>
|
||||
#include "internal.h"
|
||||
|
||||
static const struct dentry_operations proc_sys_dentry_operations;
|
||||
@@ -389,6 +390,8 @@ static const struct inode_operations proc_sys_dir_operations = {
|
||||
|
||||
static int proc_sys_revalidate(struct dentry *dentry, struct nameidata *nd)
|
||||
{
|
||||
if (nd->flags & LOOKUP_RCU)
|
||||
return -ECHILD;
|
||||
return !PROC_I(dentry->d_inode)->sysctl->unregistering;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user