Lines Matching refs:path
68 long vfs_truncate(struct path *path, loff_t length) in vfs_truncate() argument
73 inode = path->dentry->d_inode; in vfs_truncate()
81 error = mnt_want_write(path->mnt); in vfs_truncate()
107 error = security_path_truncate(path); in vfs_truncate()
109 error = do_truncate(path->dentry, length, 0, NULL); in vfs_truncate()
114 mnt_drop_write(path->mnt); in vfs_truncate()
123 struct path path; in do_sys_truncate() local
130 error = user_path_at(AT_FDCWD, pathname, lookup_flags, &path); in do_sys_truncate()
132 error = vfs_truncate(&path, length); in do_sys_truncate()
133 path_put(&path); in do_sys_truncate()
142 SYSCALL_DEFINE2(truncate, const char __user *, path, long, length) in SYSCALL_DEFINE2() argument
144 return do_sys_truncate(path, length); in SYSCALL_DEFINE2()
148 COMPAT_SYSCALL_DEFINE2(truncate, const char __user *, path, compat_off_t, length) in COMPAT_SYSCALL_DEFINE2() argument
150 return do_sys_truncate(path, length); in COMPAT_SYSCALL_DEFINE2()
215 SYSCALL_DEFINE2(truncate64, const char __user *, path, loff_t, length) in SYSCALL_DEFINE2() argument
217 return do_sys_truncate(path, length); in SYSCALL_DEFINE2()
341 struct path path; in SYSCALL_DEFINE3() local
368 res = user_path_at(dfd, filename, lookup_flags, &path); in SYSCALL_DEFINE3()
372 inode = d_backing_inode(path.dentry); in SYSCALL_DEFINE3()
380 if (path_noexec(&path)) in SYSCALL_DEFINE3()
398 if (__mnt_is_readonly(path.mnt)) in SYSCALL_DEFINE3()
402 path_put(&path); in SYSCALL_DEFINE3()
420 struct path path; in SYSCALL_DEFINE1() local
424 error = user_path_at(AT_FDCWD, filename, lookup_flags, &path); in SYSCALL_DEFINE1()
428 error = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_CHDIR); in SYSCALL_DEFINE1()
432 set_fs_pwd(current->fs, &path); in SYSCALL_DEFINE1()
435 path_put(&path); in SYSCALL_DEFINE1()
471 struct path path; in SYSCALL_DEFINE1() local
475 error = user_path_at(AT_FDCWD, filename, lookup_flags, &path); in SYSCALL_DEFINE1()
479 error = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_CHDIR); in SYSCALL_DEFINE1()
486 error = security_path_chroot(&path); in SYSCALL_DEFINE1()
490 set_fs_root(current->fs, &path); in SYSCALL_DEFINE1()
493 path_put(&path); in SYSCALL_DEFINE1()
502 static int chmod_common(struct path *path, umode_t mode) in chmod_common() argument
504 struct inode *inode = path->dentry->d_inode; in chmod_common()
509 error = mnt_want_write(path->mnt); in chmod_common()
514 error = security_path_chmod(path, mode); in chmod_common()
519 error = notify_change(path->dentry, &newattrs, &delegated_inode); in chmod_common()
527 mnt_drop_write(path->mnt); in chmod_common()
546 struct path path; in SYSCALL_DEFINE3() local
550 error = user_path_at(dfd, filename, lookup_flags, &path); in SYSCALL_DEFINE3()
552 error = chmod_common(&path, mode); in SYSCALL_DEFINE3()
553 path_put(&path); in SYSCALL_DEFINE3()
567 static int chown_common(struct path *path, uid_t user, gid_t group) in chown_common() argument
569 struct inode *inode = path->dentry->d_inode; in chown_common()
597 error = security_path_chown(path, uid, gid); in chown_common()
599 error = notify_change(path->dentry, &newattrs, &delegated_inode); in chown_common()
612 struct path path; in SYSCALL_DEFINE5() local
623 error = user_path_at(dfd, filename, lookup_flags, &path); in SYSCALL_DEFINE5()
626 error = mnt_want_write(path.mnt); in SYSCALL_DEFINE5()
629 error = chown_common(&path, user, group); in SYSCALL_DEFINE5()
630 mnt_drop_write(path.mnt); in SYSCALL_DEFINE5()
632 path_put(&path); in SYSCALL_DEFINE5()
840 int vfs_open(const struct path *path, struct file *file, in vfs_open() argument
843 struct inode *inode = vfs_select_inode(path->dentry, file->f_flags); in vfs_open()
848 file->f_path = *path; in vfs_open()
852 struct file *dentry_open(const struct path *path, int flags, in dentry_open() argument
861 BUG_ON(!path->mnt); in dentry_open()
866 error = vfs_open(path, f, cred); in dentry_open()