Lines Matching full:cx
68 struct orangefs_cached_xattr *cx; in find_cached_xattr() local
74 hlist_for_each_entry_safe(cx, tmp, h, node) { in find_cached_xattr()
75 /* if (!time_before(jiffies, cx->timeout)) { in find_cached_xattr()
76 hlist_del(&cx->node); in find_cached_xattr()
77 kfree(cx); in find_cached_xattr()
80 if (!strcmp(cx->key, key)) in find_cached_xattr()
81 return cx; in find_cached_xattr()
100 struct orangefs_cached_xattr *cx; in orangefs_inode_getxattr() local
129 cx = find_cached_xattr(inode, name); in orangefs_inode_getxattr()
130 if (cx && time_before(jiffies, cx->timeout)) { in orangefs_inode_getxattr()
131 if (cx->length == -1) { in orangefs_inode_getxattr()
136 ret = cx->length; in orangefs_inode_getxattr()
139 if (cx->length > size) { in orangefs_inode_getxattr()
143 memcpy(buffer, cx->val, cx->length); in orangefs_inode_getxattr()
144 memset(buffer + cx->length, 0, size - cx->length); in orangefs_inode_getxattr()
145 ret = cx->length; in orangefs_inode_getxattr()
174 cx = kmalloc(sizeof *cx, GFP_KERNEL); in orangefs_inode_getxattr()
175 if (cx) { in orangefs_inode_getxattr()
176 strcpy(cx->key, name); in orangefs_inode_getxattr()
177 cx->length = -1; in orangefs_inode_getxattr()
178 cx->timeout = jiffies + in orangefs_inode_getxattr()
180 hlist_add_head( &cx->node, in orangefs_inode_getxattr()
181 &orangefs_inode->xattr_cache[xattr_key(cx->key)]); in orangefs_inode_getxattr()
222 if (cx) { in orangefs_inode_getxattr()
223 strcpy(cx->key, name); in orangefs_inode_getxattr()
224 memcpy(cx->val, buffer, length); in orangefs_inode_getxattr()
225 cx->length = length; in orangefs_inode_getxattr()
226 cx->timeout = jiffies + HZ; in orangefs_inode_getxattr()
228 cx = kmalloc(sizeof *cx, GFP_KERNEL); in orangefs_inode_getxattr()
229 if (cx) { in orangefs_inode_getxattr()
230 strcpy(cx->key, name); in orangefs_inode_getxattr()
231 memcpy(cx->val, buffer, length); in orangefs_inode_getxattr()
232 cx->length = length; in orangefs_inode_getxattr()
233 cx->timeout = jiffies + HZ; in orangefs_inode_getxattr()
234 hlist_add_head(&cx->node, in orangefs_inode_getxattr()
235 &orangefs_inode->xattr_cache[xattr_key(cx->key)]); in orangefs_inode_getxattr()
251 struct orangefs_cached_xattr *cx; in orangefs_inode_removexattr() local
297 hlist_for_each_entry_safe(cx, tmp, h, node) { in orangefs_inode_removexattr()
298 if (!strcmp(cx->key, name)) { in orangefs_inode_removexattr()
299 hlist_del(&cx->node); in orangefs_inode_removexattr()
300 kfree(cx); in orangefs_inode_removexattr()
322 struct orangefs_cached_xattr *cx; in orangefs_inode_setxattr() local
388 hlist_for_each_entry_safe(cx, tmp, h, node) { in orangefs_inode_setxattr()
389 if (!strcmp(cx->key, name)) { in orangefs_inode_setxattr()
390 hlist_del(&cx->node); in orangefs_inode_setxattr()
391 kfree(cx); in orangefs_inode_setxattr()