diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index 881178d4c099caf2ebd34259f336c82e2571864b..9f16a3813d8a45580989a8acec5a1b0b83ad51db 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -758,7 +758,7 @@ static int ovl_copy_up_workdir(struct ovl_copy_up_ctx *c) return err; ovl_start_write(c->dentry); - inode_lock(wdir); + inode_lock_nested(wdir, I_MUTEX_PARENT); temp = ovl_create_temp(ofs, c->workdir, &cattr); inode_unlock(wdir); ovl_end_write(c->dentry); diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index 112f41498aec4e1f899bde9a2f1811540d97caba..a937f790d3975a81d17a3a7e858626913cabdafd 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -60,8 +60,8 @@ static struct file *ovl_open_realfile(const struct file *file, if (!inode_owner_or_capable(real_idmap, realinode)) flags &= ~O_NOATIME; - realfile = backing_file_open(&file->f_path, flags, realpath, - current_cred()); + realfile = backing_file_open(file_user_path((struct file *) file), + flags, realpath, current_cred()); } revert_creds(old_cred); diff --git a/kernel/events/core.c b/kernel/events/core.c index 7bb2c6cbb3ce1766b12736f054ea11022a6425fc..387d2805df4743bf1ad9a26d52f1e23fa0c12f01 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -8859,7 +8859,7 @@ static void perf_event_mmap_event(struct perf_mmap_event *mmap_event) * need to add enough zero bytes after the string to handle * the 64bit alignment we do later. */ - name = file_path(file, buf, PATH_MAX - sizeof(u64)); + name = d_path(file_user_path(file), buf, PATH_MAX - sizeof(u64)); if (IS_ERR(name)) { name = "//toolong"; goto cpy_name;