Lines Matching refs:fc
21 struct fuse_conn *fc = get_fuse_conn(dir); in fuse_use_readdirplus() local
24 if (!fc->do_readdirplus) in fuse_use_readdirplus()
26 if (!fc->readdirplus_auto) in fuse_use_readdirplus()
142 static void fuse_lookup_init(struct fuse_conn *fc, struct fuse_args *args, in fuse_lookup_init() argument
157 u64 fuse_get_attr_version(struct fuse_conn *fc) in fuse_get_attr_version() argument
165 spin_lock(&fc->lock); in fuse_get_attr_version()
166 curr_version = fc->attr_version; in fuse_get_attr_version()
167 spin_unlock(&fc->lock); in fuse_get_attr_version()
185 struct fuse_conn *fc; in fuse_dentry_revalidate() local
207 fc = get_fuse_conn(inode); in fuse_dentry_revalidate()
214 attr_version = fuse_get_attr_version(fc); in fuse_dentry_revalidate()
217 fuse_lookup_init(fc, &args, get_node_id(d_inode(parent)), in fuse_dentry_revalidate()
219 ret = fuse_simple_request(fc, &args); in fuse_dentry_revalidate()
227 fuse_queue_forget(fc, forget, outarg.nodeid, 1); in fuse_dentry_revalidate()
230 spin_lock(&fc->lock); in fuse_dentry_revalidate()
232 spin_unlock(&fc->lock); in fuse_dentry_revalidate()
303 struct fuse_conn *fc = get_fuse_conn_super(sb); in fuse_lookup_name() local
320 attr_version = fuse_get_attr_version(fc); in fuse_lookup_name()
322 fuse_lookup_init(fc, &args, nodeid, name, outarg); in fuse_lookup_name()
323 err = fuse_simple_request(fc, &args); in fuse_lookup_name()
339 fuse_queue_forget(fc, forget, outarg->nodeid, 1); in fuse_lookup_name()
407 struct fuse_conn *fc = get_fuse_conn(dir); in fuse_create_open() local
424 ff = fuse_file_alloc(fc); in fuse_create_open()
428 if (!fc->dont_mask) in fuse_create_open()
449 err = fuse_simple_request(fc, &args); in fuse_create_open()
465 fuse_queue_forget(fc, forget, outentry.nodeid, 1); in fuse_create_open()
496 struct fuse_conn *fc = get_fuse_conn(dir); in fuse_atomic_open() local
514 if (fc->no_create) in fuse_atomic_open()
519 fc->no_create = 1; in fuse_atomic_open()
537 static int create_new_entry(struct fuse_conn *fc, struct fuse_args *args, in create_new_entry() argument
556 err = fuse_simple_request(fc, args); in create_new_entry()
570 fuse_queue_forget(fc, forget, outarg.nodeid, 1); in create_new_entry()
598 struct fuse_conn *fc = get_fuse_conn(dir); in fuse_mknod() local
601 if (!fc->dont_mask) in fuse_mknod()
614 return create_new_entry(fc, &args, dir, entry, mode); in fuse_mknod()
626 struct fuse_conn *fc = get_fuse_conn(dir); in fuse_mkdir() local
629 if (!fc->dont_mask) in fuse_mkdir()
641 return create_new_entry(fc, &args, dir, entry, S_IFDIR); in fuse_mkdir()
647 struct fuse_conn *fc = get_fuse_conn(dir); in fuse_symlink() local
657 return create_new_entry(fc, &args, dir, entry, S_IFLNK); in fuse_symlink()
671 struct fuse_conn *fc = get_fuse_conn(dir); in fuse_unlink() local
679 err = fuse_simple_request(fc, &args); in fuse_unlink()
684 spin_lock(&fc->lock); in fuse_unlink()
685 fi->attr_version = ++fc->attr_version; in fuse_unlink()
694 spin_unlock(&fc->lock); in fuse_unlink()
707 struct fuse_conn *fc = get_fuse_conn(dir); in fuse_rmdir() local
715 err = fuse_simple_request(fc, &args); in fuse_rmdir()
731 struct fuse_conn *fc = get_fuse_conn(olddir); in fuse_rename_common() local
746 err = fuse_simple_request(fc, &args); in fuse_rename_common()
785 struct fuse_conn *fc = get_fuse_conn(olddir); in fuse_rename2() local
792 if (fc->no_rename2 || fc->minor < 23) in fuse_rename2()
799 fc->no_rename2 = 1; in fuse_rename2()
817 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_link() local
828 err = create_new_entry(fc, &args, newdir, newent, inode->i_mode); in fuse_link()
838 spin_lock(&fc->lock); in fuse_link()
839 fi->attr_version = ++fc->attr_version; in fuse_link()
841 spin_unlock(&fc->lock); in fuse_link()
854 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_fillattr() local
857 if (fc->writeback_cache && S_ISREG(inode->i_mode)) { in fuse_fillattr()
869 stat->uid = make_kuid(fc->user_ns, attr->uid); in fuse_fillattr()
870 stat->gid = make_kgid(fc->user_ns, attr->gid); in fuse_fillattr()
895 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_do_getattr() local
899 attr_version = fuse_get_attr_version(fc); in fuse_do_getattr()
918 err = fuse_simple_request(fc, &args); in fuse_do_getattr()
1044 int fuse_allow_current_process(struct fuse_conn *fc) in fuse_allow_current_process() argument
1048 if (fc->allow_other) in fuse_allow_current_process()
1049 return current_in_userns(fc->user_ns); in fuse_allow_current_process()
1052 if (uid_eq(cred->euid, fc->user_id) && in fuse_allow_current_process()
1053 uid_eq(cred->suid, fc->user_id) && in fuse_allow_current_process()
1054 uid_eq(cred->uid, fc->user_id) && in fuse_allow_current_process()
1055 gid_eq(cred->egid, fc->group_id) && in fuse_allow_current_process()
1056 gid_eq(cred->sgid, fc->group_id) && in fuse_allow_current_process()
1057 gid_eq(cred->gid, fc->group_id)) in fuse_allow_current_process()
1065 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_access() local
1072 if (fc->no_access) in fuse_access()
1082 err = fuse_simple_request(fc, &args); in fuse_access()
1084 fc->no_access = 1; in fuse_access()
1114 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_permission() local
1118 if (!fuse_allow_current_process(fc)) in fuse_permission()
1124 if (fc->default_permissions || in fuse_permission()
1137 if (fc->default_permissions) { in fuse_permission()
1204 struct fuse_conn *fc; in fuse_direntplus_link() local
1235 fc = get_fuse_conn(dir); in fuse_direntplus_link()
1261 spin_lock(&fc->lock); in fuse_direntplus_link()
1263 spin_unlock(&fc->lock); in fuse_direntplus_link()
1289 if (fc->readdirplus_auto) in fuse_direntplus_link()
1348 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_readdir() local
1356 req = fuse_get_req(fc, 1); in fuse_readdir()
1362 fuse_put_request(fc, req); in fuse_readdir()
1372 attr_version = fuse_get_attr_version(fc); in fuse_readdir()
1380 fuse_request_send(fc, req); in fuse_readdir()
1384 fuse_put_request(fc, req); in fuse_readdir()
1405 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_get_link() local
1423 ret = fuse_simple_request(fc, &args); in fuse_get_link()
1456 struct fuse_conn *fc = get_fuse_conn(file->f_mapping->host); in fuse_dir_ioctl() local
1459 if (fc->minor < 18) in fuse_dir_ioctl()
1468 struct fuse_conn *fc = get_fuse_conn(file->f_mapping->host); in fuse_dir_compat_ioctl() local
1470 if (fc->minor < 18) in fuse_dir_compat_ioctl()
1495 static void iattr_to_fattr(struct fuse_conn *fc, struct iattr *iattr, in iattr_to_fattr() argument
1503 arg->valid |= FATTR_UID, arg->uid = from_kuid(fc->user_ns, iattr->ia_uid); in iattr_to_fattr()
1505 arg->valid |= FATTR_GID, arg->gid = from_kgid(fc->user_ns, iattr->ia_gid); in iattr_to_fattr()
1537 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_set_nowrite() local
1542 spin_lock(&fc->lock); in fuse_set_nowrite()
1545 spin_unlock(&fc->lock); in fuse_set_nowrite()
1566 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_release_nowrite() local
1568 spin_lock(&fc->lock); in fuse_release_nowrite()
1570 spin_unlock(&fc->lock); in fuse_release_nowrite()
1573 static void fuse_setattr_fill(struct fuse_conn *fc, struct fuse_args *args, in fuse_setattr_fill() argument
1593 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_flush_times() local
1604 if (fc->minor >= 23) { in fuse_flush_times()
1613 fuse_setattr_fill(fc, &args, inode, &inarg, &outarg); in fuse_flush_times()
1615 return fuse_simple_request(fc, &args); in fuse_flush_times()
1630 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_do_setattr() local
1636 bool is_wb = fc->writeback_cache; in fuse_do_setattr()
1641 if (!fc->default_permissions) in fuse_do_setattr()
1652 if (fc->atomic_o_trunc) { in fuse_do_setattr()
1677 iattr_to_fattr(fc, attr, &inarg, trust_local_cmtime); in fuse_do_setattr()
1686 inarg.lock_owner = fuse_lock_owner_id(fc, current->files); in fuse_do_setattr()
1688 fuse_setattr_fill(fc, &args, inode, &inarg, &outarg); in fuse_do_setattr()
1689 err = fuse_simple_request(fc, &args); in fuse_do_setattr()
1702 spin_lock(&fc->lock); in fuse_do_setattr()
1723 spin_unlock(&fc->lock); in fuse_do_setattr()
1749 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_setattr() local
1766 if (!fc->handle_killpriv) { in fuse_setattr()
1795 if (fc->posix_acl) in fuse_setattr()
1809 struct fuse_conn *fc = get_fuse_conn(inode); in fuse_getattr() local
1811 if (!fuse_allow_current_process(fc)) in fuse_getattr()