aboutsummaryrefslogtreecommitdiffstats
path: root/fs/init.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2025-11-11 09:12:52 -0500
committerChristian Brauner <brauner@kernel.org>2025-11-12 09:38:36 +0100
commite8960c1b2ee9ba75d65492b8e90e851d11e5f215 (patch)
tree8c81470d1c608653d68138c6f11e025d5450f8f7 /fs/init.c
parentc826229c6a82fe1fe7b7752692f87a881eb4b545 (diff)
downloadtip-e8960c1b2ee9ba75d65492b8e90e851d11e5f215.tar.gz
vfs: make vfs_mknod break delegations on parent directory
In order to add directory delegation support, we need to break delegations on the parent whenever there is going to be a change in the directory. Add a new delegated_inode pointer to vfs_mknod() and have the appropriate callers wait when there is an outstanding delegation. All other callers just set the pointer to NULL. Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20251111-dir-deleg-ro-v6-11-52f3feebb2f2@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/init.c')
-rw-r--r--fs/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/init.c b/fs/init.c
index 895f8a09a71acf..4f02260dd65b0d 100644
--- a/fs/init.c
+++ b/fs/init.c
@@ -157,7 +157,7 @@ int __init init_mknod(const char *filename, umode_t mode, unsigned int dev)
error = security_path_mknod(&path, dentry, mode, dev);
if (!error)
error = vfs_mknod(mnt_idmap(path.mnt), path.dentry->d_inode,
- dentry, mode, new_decode_dev(dev));
+ dentry, mode, new_decode_dev(dev), NULL);
end_creating_path(&path, dentry);
return error;
}