Lines Matching refs:path
66 long vfs_truncate(struct path *path, loff_t length) in vfs_truncate() argument
71 inode = path->dentry->d_inode; in vfs_truncate()
79 error = mnt_want_write(path->mnt); in vfs_truncate()
105 error = security_path_truncate(path); in vfs_truncate()
107 error = do_truncate(path->dentry, length, 0, NULL); in vfs_truncate()
112 mnt_drop_write(path->mnt); in vfs_truncate()
121 struct path path; in do_sys_truncate() local
128 error = user_path_at(AT_FDCWD, pathname, lookup_flags, &path); in do_sys_truncate()
130 error = vfs_truncate(&path, length); in do_sys_truncate()
131 path_put(&path); in do_sys_truncate()
140 SYSCALL_DEFINE2(truncate, const char __user *, path, long, length) in SYSCALL_DEFINE2() argument
142 return do_sys_truncate(path, length); in SYSCALL_DEFINE2()
146 COMPAT_SYSCALL_DEFINE2(truncate, const char __user *, path, compat_off_t, length) in COMPAT_SYSCALL_DEFINE2() argument
148 return do_sys_truncate(path, length); in COMPAT_SYSCALL_DEFINE2()
213 SYSCALL_DEFINE2(truncate64, const char __user *, path, loff_t, length) in SYSCALL_DEFINE2() argument
215 return do_sys_truncate(path, length); in SYSCALL_DEFINE2()
339 struct path path; in SYSCALL_DEFINE3() local
366 res = user_path_at(dfd, filename, lookup_flags, &path); in SYSCALL_DEFINE3()
370 inode = path.dentry->d_inode; in SYSCALL_DEFINE3()
378 if (path.mnt->mnt_flags & MNT_NOEXEC) in SYSCALL_DEFINE3()
396 if (__mnt_is_readonly(path.mnt)) in SYSCALL_DEFINE3()
400 path_put(&path); in SYSCALL_DEFINE3()
418 struct path path; in SYSCALL_DEFINE1() local
422 error = user_path_at(AT_FDCWD, filename, lookup_flags, &path); in SYSCALL_DEFINE1()
426 error = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_CHDIR); in SYSCALL_DEFINE1()
430 set_fs_pwd(current->fs, &path); in SYSCALL_DEFINE1()
433 path_put(&path); in SYSCALL_DEFINE1()
469 struct path path; in SYSCALL_DEFINE1() local
473 error = user_path_at(AT_FDCWD, filename, lookup_flags, &path); in SYSCALL_DEFINE1()
477 error = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_CHDIR); in SYSCALL_DEFINE1()
484 error = security_path_chroot(&path); in SYSCALL_DEFINE1()
488 set_fs_root(current->fs, &path); in SYSCALL_DEFINE1()
491 path_put(&path); in SYSCALL_DEFINE1()
500 static int chmod_common(struct path *path, umode_t mode) in chmod_common() argument
502 struct inode *inode = path->dentry->d_inode; in chmod_common()
507 error = mnt_want_write(path->mnt); in chmod_common()
512 error = security_path_chmod(path, mode); in chmod_common()
517 error = notify_change(path->dentry, &newattrs, &delegated_inode); in chmod_common()
525 mnt_drop_write(path->mnt); in chmod_common()
544 struct path path; in SYSCALL_DEFINE3() local
548 error = user_path_at(dfd, filename, lookup_flags, &path); in SYSCALL_DEFINE3()
550 error = chmod_common(&path, mode); in SYSCALL_DEFINE3()
551 path_put(&path); in SYSCALL_DEFINE3()
565 static int chown_common(struct path *path, uid_t user, gid_t group) in chown_common() argument
567 struct inode *inode = path->dentry->d_inode; in chown_common()
595 error = security_path_chown(path, uid, gid); in chown_common()
597 error = notify_change(path->dentry, &newattrs, &delegated_inode); in chown_common()
610 struct path path; in SYSCALL_DEFINE5() local
621 error = user_path_at(dfd, filename, lookup_flags, &path); in SYSCALL_DEFINE5()
624 error = mnt_want_write(path.mnt); in SYSCALL_DEFINE5()
627 error = chown_common(&path, user, group); in SYSCALL_DEFINE5()
628 mnt_drop_write(path.mnt); in SYSCALL_DEFINE5()
630 path_put(&path); in SYSCALL_DEFINE5()
832 int vfs_open(const struct path *path, struct file *file, in vfs_open() argument
835 struct dentry *dentry = path->dentry; in vfs_open()
838 file->f_path = *path; in vfs_open()
848 struct file *dentry_open(const struct path *path, int flags, in dentry_open() argument
857 BUG_ON(!path->mnt); in dentry_open()
862 error = vfs_open(path, f, cred); in dentry_open()