Lines Matching defs:ip

188 	struct inode *ip = xf->dentry->d_inode;
194 error = -zfs_lookup(ITOZ(ip), NULL, &dxzp, LOOKUP_XATTR,
278 zpl_xattr_get_dir(struct inode *ip, const char *name, void *value,
288 error = -zfs_lookup(ITOZ(ip), NULL, &dxzp, LOOKUP_XATTR,
333 zpl_xattr_get_sa(struct inode *ip, const char *name, void *value, size_t size)
335 znode_t *zp = ITOZ(ip);
368 __zpl_xattr_get(struct inode *ip, const char *name, void *value, size_t size,
371 znode_t *zp = ITOZ(ip);
378 error = zpl_xattr_get_sa(ip, name, value, size);
383 error = zpl_xattr_get_dir(ip, name, value, size, cr);
396 __zpl_xattr_where(struct inode *ip, const char *name, int *where, cred_t *cr)
398 znode_t *zp = ITOZ(ip);
407 error = zpl_xattr_get_sa(ip, name, NULL, 0);
414 error = zpl_xattr_get_dir(ip, name, NULL, 0, cr);
422 " in both SA and dir", ip, name);
431 zpl_xattr_get(struct inode *ip, const char *name, void *value, size_t size)
433 znode_t *zp = ITOZ(ip);
444 error = __zpl_xattr_get(ip, name, value, size, cr);
455 zpl_xattr_set_dir(struct inode *ip, const char *name, const void *value,
475 error = -zfs_lookup(ITOZ(ip), NULL, &dxzp, lookup_flags,
518 zpl_inode_set_ctime_to_ts(ip, current_time(ip));
519 zfs_mark_inode_dirty(ip);
540 zpl_xattr_set_sa(struct inode *ip, const char *name, const void *value,
543 znode_t *zp = ITOZ(ip);
562 error = zpl_xattr_set_dir(ip, name, NULL, 0, flags, cr);
599 zpl_xattr_set(struct inode *ip, const char *name, const void *value,
602 znode_t *zp = ITOZ(ip);
625 error = __zpl_xattr_where(ip, name, &where, cr);
645 error = zpl_xattr_set_sa(ip, name, value, size, flags, cr);
652 zpl_xattr_set_dir(ip, name, NULL, 0, 0, cr);
657 error = zpl_xattr_set_dir(ip, name, value, size, flags, cr);
662 zpl_xattr_set_sa(ip, name, NULL, 0, 0, cr);
704 __zpl_xattr_user_list(struct inode *ip, char *list, size_t list_size,
707 return (ITOZSB(ip)->z_flags & ZSB_XATTR);
712 __zpl_xattr_user_get(struct inode *ip, const char *name,
719 if (!(ITOZSB(ip)->z_flags & ZSB_XATTR))
729 error = zpl_xattr_get(ip, xattr_name, value, size);
732 error = zpl_xattr_get(ip, name, value, size);
740 struct inode *ip, const char *name,
748 if (!(ITOZSB(ip)->z_flags & ZSB_XATTR))
772 error = zpl_xattr_set(ip, clear_name, NULL, 0, flags);
790 error = zpl_xattr_set(ip, set_name, value, size, flags);
815 __zpl_xattr_trusted_list(struct inode *ip, char *list, size_t list_size,
823 __zpl_xattr_trusted_get(struct inode *ip, const char *name,
833 error = zpl_xattr_get(ip, xattr_name, value, size);
842 struct inode *ip, const char *name,
853 error = zpl_xattr_set(ip, xattr_name, value, size, flags);
880 __zpl_xattr_security_list(struct inode *ip, char *list, size_t list_size,
888 __zpl_xattr_security_get(struct inode *ip, const char *name,
895 error = zpl_xattr_get(ip, xattr_name, value, size);
904 struct inode *ip, const char *name,
912 error = zpl_xattr_set(ip, xattr_name, value, size, flags);
920 zpl_xattr_security_init_impl(struct inode *ip, const struct xattr *xattrs,
927 error = __zpl_xattr_security_set(NULL, ip,
938 zpl_xattr_security_init(struct inode *ip, struct inode *dip,
941 return security_inode_init_security(ip, dip, qstr,
965 zpl_set_acl_impl(struct inode *ip, struct posix_acl *acl, int type)
971 if (S_ISLNK(ip->i_mode))
978 umode_t mode = ip->i_mode;
990 if (ip->i_mode != mode) {
991 ip->i_mode = ITOZ(ip)->z_mode = mode;
992 zpl_inode_set_ctime_to_ts(ip,
993 current_time(ip));
994 zfs_mark_inode_dirty(ip);
1005 if (!S_ISDIR(ip->i_mode))
1024 error = zpl_xattr_set(ip, name, value, size, 0);
1030 set_cached_acl(ip, type, acl);
1032 forget_cached_acl(ip, type);
1040 zpl_set_acl(struct user_namespace *userns, struct inode *ip,
1049 zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type)
1057 return (zpl_set_acl_impl(ip, acl, type));
1062 zpl_get_acl_impl(struct inode *ip, int type)
1079 int size = zpl_xattr_get(ip, name, NULL, 0);
1082 size = zpl_xattr_get(ip, name, value, size);
1101 zpl_get_acl(struct inode *ip, int type, bool rcu)
1106 return (zpl_get_acl_impl(ip, type));
1110 zpl_get_acl(struct inode *ip, int type)
1112 return (zpl_get_acl_impl(ip, type));
1119 zpl_init_acl(struct inode *ip, struct inode *dir)
1124 if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIX)
1127 if (!S_ISLNK(ip->i_mode)) {
1132 ITOZ(ip)->z_mode = (ip->i_mode &= ~current_umask());
1133 zpl_inode_set_ctime_to_ts(ip, current_time(ip));
1134 zfs_mark_inode_dirty(ip);
1142 if (S_ISDIR(ip->i_mode)) {
1143 error = zpl_set_acl_impl(ip, acl, ACL_TYPE_DEFAULT);
1148 mode = ip->i_mode;
1151 ip->i_mode = ITOZ(ip)->z_mode = mode;
1152 zfs_mark_inode_dirty(ip);
1154 error = zpl_set_acl_impl(ip, acl,
1166 zpl_chmod_acl(struct inode *ip)
1171 if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIX)
1174 if (S_ISLNK(ip->i_mode))
1177 acl = zpl_get_acl_impl(ip, ACL_TYPE_ACCESS);
1181 error = __posix_acl_chmod(&acl, GFP_KERNEL, ip->i_mode);
1183 error = zpl_set_acl_impl(ip, acl, ACL_TYPE_ACCESS);
1191 __zpl_xattr_acl_list_access(struct inode *ip, char *list, size_t list_size,
1197 if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIX)
1208 __zpl_xattr_acl_list_default(struct inode *ip, char *list, size_t list_size,
1214 if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIX)
1225 __zpl_xattr_acl_get_access(struct inode *ip, const char *name,
1232 if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIX)
1235 acl = zpl_get_acl_impl(ip, type);
1249 __zpl_xattr_acl_get_default(struct inode *ip, const char *name,
1256 if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIX)
1259 acl = zpl_get_acl_impl(ip, type);
1274 struct inode *ip, const char *name,
1281 if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIX)
1285 if (!zpl_inode_owner_or_capable(mnt_ns, ip))
1289 if (!zpl_inode_owner_or_capable(zfs_init_idmap, ip))
1298 error = posix_acl_valid(ip->i_sb->s_user_ns, acl);
1307 error = zpl_set_acl_impl(ip, acl, type);
1316 struct inode *ip, const char *name,
1323 if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIX)
1327 if (!zpl_inode_owner_or_capable(mnt_ns, ip))
1331 if (!zpl_inode_owner_or_capable(zfs_init_idmap, ip))
1340 error = posix_acl_valid(ip->i_sb->s_user_ns, acl);
1350 error = zpl_set_acl_impl(ip, acl, type);