Lines Matching refs:name

179  * Compare 2 name strings, return 0 if they match, otherwise non-zero.
235 * use 'READ_ONCE' to fetch the name pointer.
241 * because we're reading the name pointer atomically,
242 * and a dentry name is guaranteed to be properly
249 const unsigned char *cs = READ_ONCE(dentry->d_name.name);
259 unsigned char name[];
264 return container_of(dentry->d_name.name, struct external_name, name[0]);
283 return dentry->d_name.name != dentry->d_iname;
286 void take_dentry_name_snapshot(struct name_snapshot *name, struct dentry *dentry)
289 name->name = dentry->d_name;
293 memcpy(name->inline_name, dentry->d_iname,
295 name->name.name = name->inline_name;
301 void release_dentry_name_snapshot(struct name_snapshot *name)
303 if (unlikely(name->name.name != name->inline_name)) {
305 p = container_of(name->name.name, struct external_name, name[0]);
1615 dentry->d_sb->s_type->name,
1697 * @name: qstr of the name
1700 * available. On a success the dentry is returned. The name passed in is
1704 static struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
1715 * We guarantee that the inline name is always NUL-terminated.
1716 * This way the memcpy() done by the name switching in rename
1721 if (unlikely(!name)) {
1722 name = &slash_name;
1724 } else if (name->len > DNAME_INLINE_LEN-1) {
1725 size_t size = offsetof(struct external_name, name[1]);
1726 struct external_name *p = kmalloc(size + name->len,
1734 dname = p->name;
1739 dentry->d_name.len = name->len;
1740 dentry->d_name.hash = name->hash;
1741 memcpy(dname, name->name, name->len);
1742 dname[name->len] = 0;
1745 smp_store_release(&dentry->d_name.name, dname); /* ^^^ */
1781 * @name: qstr of the name
1784 * available. On a success the dentry is returned. The name passed in is
1787 struct dentry *d_alloc(struct dentry * parent, const struct qstr *name)
1789 struct dentry *dentry = __d_alloc(parent->d_sb, name);
1825 * @name: qstr of the name
1837 struct dentry *d_alloc_pseudo(struct super_block *sb, const struct qstr *name)
1839 struct dentry *dentry = __d_alloc(sb, name);
1845 struct dentry *d_alloc_name(struct dentry *parent, const char *name)
1849 q.name = name;
1850 q.hash_len = hashlen_string(parent, name);
2098 * or may have a full name (if the inode was already in the cache).
2138 * d_add_ci - lookup or allocate new dentry with case-exact name
2141 * @name: the case-exact name to be associated with the returned dentry
2150 * If no entry exists with the exact case name, allocate new dentry with
2154 struct qstr *name)
2159 * First check if a dentry matching the name already exists,
2162 found = d_hash_and_lookup(dentry->d_parent, name);
2168 found = d_alloc_parallel(dentry->d_parent, name,
2175 found = d_alloc(dentry->d_parent, name);
2193 const struct qstr *name)
2196 if (dentry->d_name.len != name->len)
2198 return dentry_cmp(dentry, name->name, name->len) == 0;
2201 dentry->d_name.len, dentry->d_name.name,
2202 name) == 0;
2208 * @name: qstr of name we wish to find
2212 * __d_lookup_rcu is the dcache lookup function for rcu-walk name
2235 const struct qstr *name,
2238 u64 hashlen = name->hash_len;
2239 const unsigned char *str = name->name;
2270 * renames, and thus protects parent and name fields.
2283 * we are still guaranteed NUL-termination of ->d_name.name.
2297 tname = dentry->d_name.name;
2298 /* we want a consistent (name,len) pair */
2304 tlen, tname, name) != 0)
2321 * @name: qstr of name we wish to find
2324 * d_lookup searches the children of the parent dentry for the name in
2329 struct dentry *d_lookup(const struct dentry *parent, const struct qstr *name)
2336 dentry = __d_lookup(parent, name);
2347 * @name: qstr of name we wish to find
2359 struct dentry *__d_lookup(const struct dentry *parent, const struct qstr *name)
2361 unsigned int hash = name->hash;
2400 if (!d_same_name(dentry, parent, name))
2418 * @name: qstr of name we wish to find
2420 * On lookup failure NULL is returned; on bad name - ERR_PTR(-error)
2422 struct dentry *d_hash_and_lookup(struct dentry *dir, struct qstr *name)
2429 name->hash = full_name_hash(dir, name->name, name->len);
2431 int err = dir->d_op->d_hash(dir, name);
2435 return d_lookup(dir, name);
2493 * Adds a dentry to the hash according to its name.
2535 const struct qstr *name,
2538 unsigned int hash = name->hash;
2541 struct dentry *new = d_alloc(parent, name);
2552 dentry = __d_lookup_rcu(parent, name, &d_seq);
2595 if (!d_same_name(dentry, parent, name))
2623 if (unlikely(!d_same_name(dentry, parent, name)))
2711 * If an unhashed dentry with the same name/parent and desired
2726 * d_parent == entry->d_parent are not subject to name or
2759 swap(target->d_name.name, dentry->d_name.name);
2765 memcpy(target->d_iname, dentry->d_name.name,
2767 dentry->d_name.name = target->d_name.name;
2768 target->d_name.name = target->d_iname;
2776 memcpy(dentry->d_iname, target->d_name.name,
2778 target->d_name.name = dentry->d_name.name;
2779 dentry->d_name.name = dentry->d_iname;
2804 memcpy(dentry->d_iname, target->d_name.name,
2806 dentry->d_name.name = dentry->d_iname;
2819 * Update the dcache to reflect the move of a file name. Negative
2909 * Update the dcache to reflect the move of a file name. Negative
3045 dentry->d_name.name,
3046 inode->i_sb->s_type->name,
3139 BUG_ON(dentry->d_name.name != dentry->d_iname ||