mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
committed by
Christian Brauner
parent
c826229c6a
commit
e8960c1b2e
@@ -1399,7 +1399,7 @@ static int unix_bind_bsd(struct sock *sk, struct sockaddr_un *sunaddr,
|
||||
idmap = mnt_idmap(parent.mnt);
|
||||
err = security_path_mknod(&parent, dentry, mode, 0);
|
||||
if (!err)
|
||||
err = vfs_mknod(idmap, d_inode(parent.dentry), dentry, mode, 0);
|
||||
err = vfs_mknod(idmap, d_inode(parent.dentry), dentry, mode, 0, NULL);
|
||||
if (err)
|
||||
goto out_path;
|
||||
err = mutex_lock_interruptible(&u->bindlock);
|
||||
|
||||
Reference in New Issue
Block a user