Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull more vfs updates from Al Viro:
"Assorted cleanups and fixes.

In the "trivial API change" department - ->d_compare() losing 'parent'
argument"

* 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
cachefiles: Fix race between inactivating and culling a cache object
9p: use clone_fid()
9p: fix braino introduced in "9p: new helper - v9fs_parent_fid()"
vfs: make dentry_needs_remove_privs() internal
vfs: remove file_needs_remove_privs()
vfs: fix deadlock in file_remove_privs() on overlayfs
get rid of 'parent' argument of ->d_compare()
cifs, msdos, vfat, hfs+: don't bother with parent in ->d_compare()
affs ->d_compare(): don't bother with ->d_inode
fold _d_rehash() and __d_rehash() together
fold dentry_rcuwalk_invalidate() into its only remaining caller

+82 -130
+1 -1
Documentation/filesystems/Locking
··· 12 12 int (*d_revalidate)(struct dentry *, unsigned int); 13 13 int (*d_weak_revalidate)(struct dentry *, unsigned int); 14 14 int (*d_hash)(const struct dentry *, struct qstr *); 15 - int (*d_compare)(const struct dentry *, const struct dentry *, 15 + int (*d_compare)(const struct dentry *, 16 16 unsigned int, const char *, const struct qstr *); 17 17 int (*d_delete)(struct dentry *); 18 18 int (*d_init)(struct dentry *);
+7
Documentation/filesystems/porting
··· 585 585 in the instances. Rationale: !@#!@# security_d_instantiate() needs to be 586 586 called before we attach dentry to inode and !@#!@##!@$!$#!@#$!@$!@$ smack 587 587 ->d_instantiate() uses not just ->getxattr() but ->setxattr() as well. 588 + -- 589 + [mandatory] 590 + ->d_compare() doesn't get parent as a separate argument anymore. If you 591 + used it for finding the struct super_block involved, dentry->d_sb will 592 + work just as well; if it's something more complicated, use dentry->d_parent. 593 + Just be careful not to assume that fetching it more than once will yield 594 + the same value - in RCU mode it could change under you.
+1 -1
Documentation/filesystems/vfs.txt
··· 931 931 int (*d_revalidate)(struct dentry *, unsigned int); 932 932 int (*d_weak_revalidate)(struct dentry *, unsigned int); 933 933 int (*d_hash)(const struct dentry *, struct qstr *); 934 - int (*d_compare)(const struct dentry *, const struct dentry *, 934 + int (*d_compare)(const struct dentry *, 935 935 unsigned int, const char *, const struct qstr *); 936 936 int (*d_delete)(const struct dentry *); 937 937 int (*d_init)(struct dentry *);
+1 -1
drivers/staging/lustre/lustre/llite/dcache.c
··· 78 78 * INVALID) so d_lookup() matches it, but we have no lock on it (so 79 79 * lock_match() fails) and we spin around real_lookup(). 80 80 */ 81 - static int ll_dcompare(const struct dentry *parent, const struct dentry *dentry, 81 + static int ll_dcompare(const struct dentry *dentry, 82 82 unsigned int len, const char *str, 83 83 const struct qstr *name) 84 84 {
+1 -25
fs/9p/fid.c
··· 257 257 return v9fs_fid_lookup_with_uid(dentry, uid, any); 258 258 } 259 259 260 - struct p9_fid *v9fs_fid_clone(struct dentry *dentry) 261 - { 262 - struct p9_fid *fid, *ret; 263 - 264 - fid = v9fs_fid_lookup(dentry); 265 - if (IS_ERR(fid)) 266 - return fid; 267 - 268 - ret = p9_client_walk(fid, 0, NULL, 1); 269 - return ret; 270 - } 271 - 272 - static struct p9_fid *v9fs_fid_clone_with_uid(struct dentry *dentry, kuid_t uid) 273 - { 274 - struct p9_fid *fid, *ret; 275 - 276 - fid = v9fs_fid_lookup_with_uid(dentry, uid, 0); 277 - if (IS_ERR(fid)) 278 - return fid; 279 - 280 - ret = p9_client_walk(fid, 0, NULL, 1); 281 - return ret; 282 - } 283 - 284 260 struct p9_fid *v9fs_writeback_fid(struct dentry *dentry) 285 261 { 286 262 int err; 287 263 struct p9_fid *fid; 288 264 289 - fid = v9fs_fid_clone_with_uid(dentry, GLOBAL_ROOT_UID); 265 + fid = clone_fid(v9fs_fid_lookup_with_uid(dentry, GLOBAL_ROOT_UID, 0)); 290 266 if (IS_ERR(fid)) 291 267 goto error_out; 292 268 /*
+8 -1
fs/9p/fid.h
··· 28 28 { 29 29 return v9fs_fid_lookup(dentry->d_parent); 30 30 } 31 - struct p9_fid *v9fs_fid_clone(struct dentry *dentry); 32 31 void v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid); 33 32 struct p9_fid *v9fs_writeback_fid(struct dentry *dentry); 33 + static inline struct p9_fid *clone_fid(struct p9_fid *fid) 34 + { 35 + return IS_ERR(fid) ? fid : p9_client_walk(fid, 0, NULL, 1); 36 + } 37 + static inline struct p9_fid *v9fs_fid_clone(struct dentry *dentry) 38 + { 39 + return clone_fid(v9fs_fid_lookup(dentry)); 40 + } 34 41 #endif
+3 -3
fs/9p/vfs_inode.c
··· 661 661 } 662 662 663 663 /* clone a fid to use for creation */ 664 - ofid = p9_client_walk(dfid, 0, NULL, 1); 664 + ofid = clone_fid(dfid); 665 665 if (IS_ERR(ofid)) { 666 666 err = PTR_ERR(ofid); 667 667 p9_debug(P9_DEBUG_VFS, "p9_client_walk failed %d\n", err); ··· 975 975 if (IS_ERR(oldfid)) 976 976 return PTR_ERR(oldfid); 977 977 978 - olddirfid = v9fs_parent_fid(old_dentry); 978 + olddirfid = clone_fid(v9fs_parent_fid(old_dentry)); 979 979 if (IS_ERR(olddirfid)) { 980 980 retval = PTR_ERR(olddirfid); 981 981 goto done; 982 982 } 983 983 984 - newdirfid = v9fs_parent_fid(new_dentry); 984 + newdirfid = clone_fid(v9fs_parent_fid(new_dentry)); 985 985 if (IS_ERR(newdirfid)) { 986 986 retval = PTR_ERR(newdirfid); 987 987 goto clunk_olddir;
+1 -1
fs/9p/vfs_inode_dotl.c
··· 281 281 } 282 282 283 283 /* clone a fid to use for creation */ 284 - ofid = p9_client_walk(dfid, 0, NULL, 1); 284 + ofid = clone_fid(dfid); 285 285 if (IS_ERR(ofid)) { 286 286 err = PTR_ERR(ofid); 287 287 p9_debug(P9_DEBUG_VFS, "p9_client_walk failed %d\n", err);
+1 -3
fs/9p/xattr.c
··· 97 97 const void *value, size_t value_len, int flags) 98 98 { 99 99 struct p9_fid *fid = v9fs_fid_lookup(dentry); 100 - if (IS_ERR(fid)) 101 - return PTR_ERR(fid); 102 100 return v9fs_fid_xattr_set(fid, name, value, value_len, flags); 103 101 } 104 102 ··· 113 115 name, value_len, flags); 114 116 115 117 /* Clone it */ 116 - fid = p9_client_walk(fid, 0, NULL, 1); 118 + fid = clone_fid(fid); 117 119 if (IS_ERR(fid)) 118 120 return PTR_ERR(fid); 119 121
+1 -1
fs/adfs/dir.c
··· 227 227 * requirements of the underlying filesystem. 228 228 */ 229 229 static int 230 - adfs_compare(const struct dentry *parent, const struct dentry *dentry, 230 + adfs_compare(const struct dentry *dentry, 231 231 unsigned int len, const char *str, const struct qstr *name) 232 232 { 233 233 int i;
+1 -3
fs/affs/amigaffs.c
··· 472 472 bool 473 473 affs_nofilenametruncate(const struct dentry *dentry) 474 474 { 475 - struct inode *inode = d_inode(dentry); 476 - 477 - return affs_test_opt(AFFS_SB(inode->i_sb)->s_flags, SF_NO_TRUNCATE); 475 + return affs_test_opt(AFFS_SB(dentry->d_sb)->s_flags, SF_NO_TRUNCATE); 478 476 } 479 477 480 478 /* Check if the name is valid for a affs object. */
+6 -6
fs/affs/namei.c
··· 14 14 15 15 static int affs_toupper(int ch); 16 16 static int affs_hash_dentry(const struct dentry *, struct qstr *); 17 - static int affs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, 17 + static int affs_compare_dentry(const struct dentry *dentry, 18 18 unsigned int len, const char *str, const struct qstr *name); 19 19 static int affs_intl_toupper(int ch); 20 20 static int affs_intl_hash_dentry(const struct dentry *, struct qstr *); 21 - static int affs_intl_compare_dentry(const struct dentry *parent, const struct dentry *dentry, 21 + static int affs_intl_compare_dentry(const struct dentry *dentry, 22 22 unsigned int len, const char *str, const struct qstr *name); 23 23 24 24 const struct dentry_operations affs_dentry_operations = { ··· 131 131 } 132 132 133 133 static int 134 - affs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, 134 + affs_compare_dentry(const struct dentry *dentry, 135 135 unsigned int len, const char *str, const struct qstr *name) 136 136 { 137 137 138 138 return __affs_compare_dentry(len, str, name, affs_toupper, 139 - affs_nofilenametruncate(parent)); 139 + affs_nofilenametruncate(dentry)); 140 140 } 141 141 142 142 static int 143 - affs_intl_compare_dentry(const struct dentry *parent, const struct dentry *dentry, 143 + affs_intl_compare_dentry(const struct dentry *dentry, 144 144 unsigned int len, const char *str, const struct qstr *name) 145 145 { 146 146 return __affs_compare_dentry(len, str, name, affs_intl_toupper, 147 - affs_nofilenametruncate(parent)); 147 + affs_nofilenametruncate(dentry)); 148 148 149 149 } 150 150
+3 -2
fs/cachefiles/namei.c
··· 263 263 void cachefiles_mark_object_inactive(struct cachefiles_cache *cache, 264 264 struct cachefiles_object *object) 265 265 { 266 + blkcnt_t i_blocks = d_backing_inode(object->dentry)->i_blocks; 267 + 266 268 write_lock(&cache->active_lock); 267 269 rb_erase(&object->active_node, &cache->active_nodes); 268 270 clear_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags); ··· 275 273 /* This object can now be culled, so we need to let the daemon know 276 274 * that there is something it can remove if it needs to. 277 275 */ 278 - atomic_long_add(d_backing_inode(object->dentry)->i_blocks, 279 - &cache->b_released); 276 + atomic_long_add(i_blocks, &cache->b_released); 280 277 if (atomic_inc_return(&cache->f_released)) 281 278 cachefiles_state_changed(cache); 282 279 }
+2 -2
fs/cifs/dir.c
··· 903 903 return 0; 904 904 } 905 905 906 - static int cifs_ci_compare(const struct dentry *parent, const struct dentry *dentry, 906 + static int cifs_ci_compare(const struct dentry *dentry, 907 907 unsigned int len, const char *str, const struct qstr *name) 908 908 { 909 - struct nls_table *codepage = CIFS_SB(parent->d_sb)->local_nls; 909 + struct nls_table *codepage = CIFS_SB(dentry->d_sb)->local_nls; 910 910 wchar_t c1, c2; 911 911 int i, l1, l2; 912 912
+15 -40
fs/dcache.c
··· 316 316 call_rcu(&dentry->d_u.d_rcu, __d_free); 317 317 } 318 318 319 - /** 320 - * dentry_rcuwalk_invalidate - invalidate in-progress rcu-walk lookups 321 - * @dentry: the target dentry 322 - * After this call, in-progress rcu-walk path lookup will fail. This 323 - * should be called after unhashing, and after changing d_inode (if 324 - * the dentry has not already been unhashed). 325 - */ 326 - static inline void dentry_rcuwalk_invalidate(struct dentry *dentry) 327 - { 328 - lockdep_assert_held(&dentry->d_lock); 329 - /* Go through am invalidation barrier */ 330 - write_seqcount_invalidate(&dentry->d_seq); 331 - } 332 - 333 319 /* 334 320 * Release the dentry's inode, using the filesystem 335 321 * d_iput() operation if defined. ··· 454 468 __hlist_bl_del(&dentry->d_hash); 455 469 dentry->d_hash.pprev = NULL; 456 470 hlist_bl_unlock(b); 457 - dentry_rcuwalk_invalidate(dentry); 471 + /* After this call, in-progress rcu-walk path lookup will fail. */ 472 + write_seqcount_invalidate(&dentry->d_seq); 458 473 } 459 474 } 460 475 EXPORT_SYMBOL(__d_drop); ··· 2047 2060 return false; 2048 2061 return dentry_cmp(dentry, name->name, name->len) == 0; 2049 2062 } 2050 - return parent->d_op->d_compare(parent, dentry, 2063 + return parent->d_op->d_compare(dentry, 2051 2064 dentry->d_name.len, dentry->d_name.name, 2052 2065 name) == 0; 2053 2066 } ··· 2150 2163 cpu_relax(); 2151 2164 goto seqretry; 2152 2165 } 2153 - if (parent->d_op->d_compare(parent, dentry, 2166 + if (parent->d_op->d_compare(dentry, 2154 2167 tlen, tname, name) != 0) 2155 2168 continue; 2156 2169 } else { ··· 2339 2352 } 2340 2353 EXPORT_SYMBOL(d_delete); 2341 2354 2342 - static void __d_rehash(struct dentry * entry, struct hlist_bl_head *b) 2355 + static void __d_rehash(struct dentry *entry) 2343 2356 { 2357 + struct hlist_bl_head *b = d_hash(entry->d_name.hash); 2344 2358 BUG_ON(!d_unhashed(entry)); 2345 2359 hlist_bl_lock(b); 2346 2360 hlist_bl_add_head_rcu(&entry->d_hash, b); 2347 2361 hlist_bl_unlock(b); 2348 - } 2349 - 2350 - static void _d_rehash(struct dentry * entry) 2351 - { 2352 - __d_rehash(entry, d_hash(entry->d_name.hash)); 2353 2362 } 2354 2363 2355 2364 /** ··· 2358 2375 void d_rehash(struct dentry * entry) 2359 2376 { 2360 2377 spin_lock(&entry->d_lock); 2361 - _d_rehash(entry); 2378 + __d_rehash(entry); 2362 2379 spin_unlock(&entry->d_lock); 2363 2380 } 2364 2381 EXPORT_SYMBOL(d_rehash); ··· 2532 2549 raw_write_seqcount_end(&dentry->d_seq); 2533 2550 fsnotify_update_flags(dentry); 2534 2551 } 2535 - _d_rehash(dentry); 2552 + __d_rehash(dentry); 2536 2553 if (dir) 2537 2554 end_dir_add(dir, n); 2538 2555 spin_unlock(&dentry->d_lock); ··· 2594 2611 alias = NULL; 2595 2612 } else { 2596 2613 __dget_dlock(alias); 2597 - _d_rehash(alias); 2614 + __d_rehash(alias); 2598 2615 spin_unlock(&alias->d_lock); 2599 2616 } 2600 2617 spin_unlock(&inode->i_lock); ··· 2778 2795 write_seqcount_begin(&dentry->d_seq); 2779 2796 write_seqcount_begin_nested(&target->d_seq, DENTRY_D_LOCK_NESTED); 2780 2797 2798 + /* unhash both */ 2781 2799 /* __d_drop does write_seqcount_barrier, but they're OK to nest. */ 2782 - 2783 - /* 2784 - * Move the dentry to the target hash queue. Don't bother checking 2785 - * for the same hash queue because of how unlikely it is. 2786 - */ 2787 2800 __d_drop(dentry); 2788 - __d_rehash(dentry, d_hash(target->d_name.hash)); 2789 - 2790 - /* 2791 - * Unhash the target (d_delete() is not usable here). If exchanging 2792 - * the two dentries, then rehash onto the other's hash queue. 2793 - */ 2794 2801 __d_drop(target); 2795 - if (exchange) { 2796 - __d_rehash(target, d_hash(dentry->d_name.hash)); 2797 - } 2798 2802 2799 2803 /* Switch the names.. */ 2800 2804 if (exchange) 2801 2805 swap_names(dentry, target); 2802 2806 else 2803 2807 copy_name(dentry, target); 2808 + 2809 + /* rehash in new place(s) */ 2810 + __d_rehash(dentry); 2811 + if (exchange) 2812 + __d_rehash(target); 2804 2813 2805 2814 /* ... and switch them in the tree */ 2806 2815 if (IS_ROOT(dentry)) {
+1 -2
fs/efivarfs/super.c
··· 45 45 * So we need to perform a case-sensitive match on part 1 and a 46 46 * case-insensitive match on part 2. 47 47 */ 48 - static int efivarfs_d_compare(const struct dentry *parent, 49 - const struct dentry *dentry, 48 + static int efivarfs_d_compare(const struct dentry *dentry, 50 49 unsigned int len, const char *str, 51 50 const struct qstr *name) 52 51 {
+2 -2
fs/fat/namei_msdos.c
··· 162 162 * Compare two msdos names. If either of the names are invalid, 163 163 * we fall back to doing the standard name comparison. 164 164 */ 165 - static int msdos_cmp(const struct dentry *parent, const struct dentry *dentry, 165 + static int msdos_cmp(const struct dentry *dentry, 166 166 unsigned int len, const char *str, const struct qstr *name) 167 167 { 168 - struct fat_mount_options *options = &MSDOS_SB(parent->d_sb)->options; 168 + struct fat_mount_options *options = &MSDOS_SB(dentry->d_sb)->options; 169 169 unsigned char a_msdos_name[MSDOS_NAME], b_msdos_name[MSDOS_NAME]; 170 170 int error; 171 171
+3 -3
fs/fat/namei_vfat.c
··· 138 138 /* 139 139 * Case insensitive compare of two vfat names. 140 140 */ 141 - static int vfat_cmpi(const struct dentry *parent, const struct dentry *dentry, 141 + static int vfat_cmpi(const struct dentry *dentry, 142 142 unsigned int len, const char *str, const struct qstr *name) 143 143 { 144 - struct nls_table *t = MSDOS_SB(parent->d_sb)->nls_io; 144 + struct nls_table *t = MSDOS_SB(dentry->d_sb)->nls_io; 145 145 unsigned int alen, blen; 146 146 147 147 /* A filename cannot end in '.' or we treat it like it has none */ ··· 157 157 /* 158 158 * Case sensitive compare of two vfat names. 159 159 */ 160 - static int vfat_cmp(const struct dentry *parent, const struct dentry *dentry, 160 + static int vfat_cmp(const struct dentry *dentry, 161 161 unsigned int len, const char *str, const struct qstr *name) 162 162 { 163 163 unsigned int alen, blen;
+1 -1
fs/hfs/hfs_fs.h
··· 233 233 extern int hfs_hash_dentry(const struct dentry *, struct qstr *); 234 234 extern int hfs_strcmp(const unsigned char *, unsigned int, 235 235 const unsigned char *, unsigned int); 236 - extern int hfs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, 236 + extern int hfs_compare_dentry(const struct dentry *dentry, 237 237 unsigned int len, const char *str, const struct qstr *name); 238 238 239 239 /* trans.c */
+1 -1
fs/hfs/string.c
··· 92 92 * Test for equality of two strings in the HFS filename character ordering. 93 93 * return 1 on failure and 0 on success 94 94 */ 95 - int hfs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, 95 + int hfs_compare_dentry(const struct dentry *dentry, 96 96 unsigned int len, const char *str, const struct qstr *name) 97 97 { 98 98 const unsigned char *n1, *n2;
+1 -2
fs/hfsplus/hfsplus_fs.h
··· 520 520 int hfsplus_asc2uni(struct super_block *sb, struct hfsplus_unistr *ustr, 521 521 int max_unistr_len, const char *astr, int len); 522 522 int hfsplus_hash_dentry(const struct dentry *dentry, struct qstr *str); 523 - int hfsplus_compare_dentry(const struct dentry *parent, 524 - const struct dentry *dentry, unsigned int len, 523 + int hfsplus_compare_dentry(const struct dentry *dentry, unsigned int len, 525 524 const char *str, const struct qstr *name); 526 525 527 526 /* wrapper.c */
+2 -2
fs/hfsplus/unicode.c
··· 385 385 * Composed unicode characters are decomposed and case-folding is performed 386 386 * if the appropriate bits are (un)set on the superblock. 387 387 */ 388 - int hfsplus_compare_dentry(const struct dentry *parent, const struct dentry *dentry, 388 + int hfsplus_compare_dentry(const struct dentry *dentry, 389 389 unsigned int len, const char *str, const struct qstr *name) 390 390 { 391 - struct super_block *sb = parent->d_sb; 391 + struct super_block *sb = dentry->d_sb; 392 392 int casefold, decompose, size; 393 393 int dsize1, dsize2, len1, len2; 394 394 const u16 *dstr1, *dstr2;
+2 -2
fs/hpfs/dentry.c
··· 34 34 return 0; 35 35 } 36 36 37 - static int hpfs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, 37 + static int hpfs_compare_dentry(const struct dentry *dentry, 38 38 unsigned int len, const char *str, const struct qstr *name) 39 39 { 40 40 unsigned al = len; ··· 50 50 51 51 if (hpfs_chk_name(name->name, &bl)) 52 52 return 1; 53 - if (hpfs_compare_names(parent->d_sb, str, al, name->name, bl, 0)) 53 + if (hpfs_compare_names(dentry->d_sb, str, al, name->name, bl, 0)) 54 54 return 1; 55 55 return 0; 56 56 }
+3 -4
fs/inode.c
··· 1729 1729 mask |= ATTR_KILL_PRIV; 1730 1730 return mask; 1731 1731 } 1732 - EXPORT_SYMBOL(dentry_needs_remove_privs); 1733 1732 1734 1733 static int __remove_privs(struct dentry *dentry, int kill) 1735 1734 { ··· 1748 1749 */ 1749 1750 int file_remove_privs(struct file *file) 1750 1751 { 1751 - struct dentry *dentry = file->f_path.dentry; 1752 - struct inode *inode = d_inode(dentry); 1752 + struct dentry *dentry = file_dentry(file); 1753 + struct inode *inode = file_inode(file); 1753 1754 int kill; 1754 1755 int error = 0; 1755 1756 ··· 1757 1758 if (IS_NOSEC(inode)) 1758 1759 return 0; 1759 1760 1760 - kill = file_needs_remove_privs(file); 1761 + kill = dentry_needs_remove_privs(dentry); 1761 1762 if (kill < 0) 1762 1763 return kill; 1763 1764 if (kill)
+1
fs/internal.h
··· 117 117 */ 118 118 extern long prune_icache_sb(struct super_block *sb, struct shrink_control *sc); 119 119 extern void inode_add_lru(struct inode *inode); 120 + extern int dentry_needs_remove_privs(struct dentry *dentry); 120 121 121 122 /* 122 123 * fs-writeback.c
+6 -9
fs/isofs/inode.c
··· 29 29 #define BEQUIET 30 30 31 31 static int isofs_hashi(const struct dentry *parent, struct qstr *qstr); 32 - static int isofs_dentry_cmpi(const struct dentry *parent, 33 - const struct dentry *dentry, 32 + static int isofs_dentry_cmpi(const struct dentry *dentry, 34 33 unsigned int len, const char *str, const struct qstr *name); 35 34 36 35 #ifdef CONFIG_JOLIET 37 36 static int isofs_hashi_ms(const struct dentry *parent, struct qstr *qstr); 38 37 static int isofs_hash_ms(const struct dentry *parent, struct qstr *qstr); 39 - static int isofs_dentry_cmpi_ms(const struct dentry *parent, 40 - const struct dentry *dentry, 38 + static int isofs_dentry_cmpi_ms(const struct dentry *dentry, 41 39 unsigned int len, const char *str, const struct qstr *name); 42 - static int isofs_dentry_cmp_ms(const struct dentry *parent, 43 - const struct dentry *dentry, 40 + static int isofs_dentry_cmp_ms(const struct dentry *dentry, 44 41 unsigned int len, const char *str, const struct qstr *name); 45 42 #endif 46 43 ··· 232 235 } 233 236 234 237 static int 235 - isofs_dentry_cmpi(const struct dentry *parent, const struct dentry *dentry, 238 + isofs_dentry_cmpi(const struct dentry *dentry, 236 239 unsigned int len, const char *str, const struct qstr *name) 237 240 { 238 241 return isofs_dentry_cmp_common(len, str, name, 0, 1); ··· 273 276 } 274 277 275 278 static int 276 - isofs_dentry_cmp_ms(const struct dentry *parent, const struct dentry *dentry, 279 + isofs_dentry_cmp_ms(const struct dentry *dentry, 277 280 unsigned int len, const char *str, const struct qstr *name) 278 281 { 279 282 return isofs_dentry_cmp_common(len, str, name, 1, 0); 280 283 } 281 284 282 285 static int 283 - isofs_dentry_cmpi_ms(const struct dentry *parent, const struct dentry *dentry, 286 + isofs_dentry_cmpi_ms(const struct dentry *dentry, 284 287 unsigned int len, const char *str, const struct qstr *name) 285 288 { 286 289 return isofs_dentry_cmp_common(len, str, name, 1, 1);
+1 -1
fs/isofs/namei.c
··· 22 22 qstr.len = dlen; 23 23 if (likely(!dentry->d_op)) 24 24 return dentry->d_name.len != dlen || memcmp(dentry->d_name.name, compare, dlen); 25 - return dentry->d_op->d_compare(NULL, NULL, dentry->d_name.len, dentry->d_name.name, &qstr); 25 + return dentry->d_op->d_compare(NULL, dentry->d_name.len, dentry->d_name.name, &qstr); 26 26 } 27 27 28 28 /*
+1 -1
fs/jfs/namei.c
··· 1572 1572 return 0; 1573 1573 } 1574 1574 1575 - static int jfs_ci_compare(const struct dentry *parent, const struct dentry *dentry, 1575 + static int jfs_ci_compare(const struct dentry *dentry, 1576 1576 unsigned int len, const char *str, const struct qstr *name) 1577 1577 { 1578 1578 int i, result = 1;
+3 -3
fs/ncpfs/dir.c
··· 74 74 */ 75 75 static int ncp_lookup_validate(struct dentry *, unsigned int); 76 76 static int ncp_hash_dentry(const struct dentry *, struct qstr *); 77 - static int ncp_compare_dentry(const struct dentry *, const struct dentry *, 77 + static int ncp_compare_dentry(const struct dentry *, 78 78 unsigned int, const char *, const struct qstr *); 79 79 static int ncp_delete_dentry(const struct dentry *); 80 80 static void ncp_d_prune(struct dentry *dentry); ··· 154 154 * the callers will handle races. 155 155 */ 156 156 static int 157 - ncp_compare_dentry(const struct dentry *parent, const struct dentry *dentry, 157 + ncp_compare_dentry(const struct dentry *dentry, 158 158 unsigned int len, const char *str, const struct qstr *name) 159 159 { 160 160 struct inode *pinode; ··· 162 162 if (len != name->len) 163 163 return 1; 164 164 165 - pinode = d_inode_rcu(parent); 165 + pinode = d_inode_rcu(dentry->d_parent); 166 166 if (!pinode) 167 167 return 1; 168 168
+1 -1
fs/proc/proc_sysctl.c
··· 834 834 return res; 835 835 } 836 836 837 - static int proc_sys_compare(const struct dentry *parent, const struct dentry *dentry, 837 + static int proc_sys_compare(const struct dentry *dentry, 838 838 unsigned int len, const char *str, const struct qstr *name) 839 839 { 840 840 struct ctl_table_header *head;
+1 -1
include/linux/dcache.h
··· 130 130 int (*d_revalidate)(struct dentry *, unsigned int); 131 131 int (*d_weak_revalidate)(struct dentry *, unsigned int); 132 132 int (*d_hash)(const struct dentry *, struct qstr *); 133 - int (*d_compare)(const struct dentry *, const struct dentry *, 133 + int (*d_compare)(const struct dentry *, 134 134 unsigned int, const char *, const struct qstr *); 135 135 int (*d_delete)(const struct dentry *); 136 136 int (*d_init)(struct dentry *);
-5
include/linux/fs.h
··· 2748 2748 extern void free_inode_nonrcu(struct inode *inode); 2749 2749 extern int should_remove_suid(struct dentry *); 2750 2750 extern int file_remove_privs(struct file *); 2751 - extern int dentry_needs_remove_privs(struct dentry *dentry); 2752 - static inline int file_needs_remove_privs(struct file *file) 2753 - { 2754 - return dentry_needs_remove_privs(file->f_path.dentry); 2755 - } 2756 2751 2757 2752 extern void __insert_inode_hash(struct inode *, unsigned long hashval); 2758 2753 static inline void insert_inode_hash(struct inode *inode)