···166166 mutex_lock(&d_inode(dir)->i_mutex);167167 list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_child) {168168 spin_lock(&dentry->d_lock);169169- if (!(d_unhashed(dentry)) && d_really_is_positive(dentry)) {169169+ if (simple_positive(dentry)) {170170 dget_dlock(dentry);171171 __d_drop(dentry);172172 spin_unlock(&dentry->d_lock);
+1-6
arch/s390/hypfs/inode.c
···6262 hypfs_last_dentry = dentry;6363}64646565-static inline int hypfs_positive(struct dentry *dentry)6666-{6767- return d_really_is_positive(dentry) && !d_unhashed(dentry);6868-}6969-7065static void hypfs_remove(struct dentry *dentry)7166{7267 struct dentry *parent;73687469 parent = dentry->d_parent;7570 mutex_lock(&d_inode(parent)->i_mutex);7676- if (hypfs_positive(dentry)) {7171+ if (simple_positive(dentry)) {7772 if (d_is_dir(dentry))7873 simple_rmdir(d_inode(parent), dentry);7974 else
+1-9
drivers/block/drbd/drbd_debugfs.c
···419419 return 0;420420}421421422422-/* simple_positive(file->f_path.dentry) respectively debugfs_positive(),423423- * but neither is "reachable" from here.424424- * So we have our own inline version of it above. :-( */425425-static inline int debugfs_positive(struct dentry *dentry)426426-{427427- return d_really_is_positive(dentry) && !d_unhashed(dentry);428428-}429429-430422/* make sure at *open* time that the respective object won't go away. */431423static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, void *),432424 void *data, struct kref *kref,···436444 /* serialize with d_delete() */437445 mutex_lock(&d_inode(parent)->i_mutex);438446 /* Make sure the object is still alive */439439- if (debugfs_positive(file->f_path.dentry)447447+ if (simple_positive(file->f_path.dentry)440448 && kref_get_unless_zero(kref))441449 ret = 0;442450 mutex_unlock(&d_inode(parent)->i_mutex);
+1-1
drivers/infiniband/hw/ipath/ipath_fs.c
···277277 }278278279279 spin_lock(&tmp->d_lock);280280- if (!d_unhashed(tmp) && d_really_is_positive(tmp)) {280280+ if (simple_positive(tmp)) {281281 dget_dlock(tmp);282282 __d_drop(tmp);283283 spin_unlock(&tmp->d_lock);
+1-1
drivers/infiniband/hw/qib/qib_fs.c
···455455 }456456457457 spin_lock(&tmp->d_lock);458458- if (!d_unhashed(tmp) && d_really_is_positive(tmp)) {458458+ if (simple_positive(tmp)) {459459 __d_drop(tmp);460460 spin_unlock(&tmp->d_lock);461461 simple_unlink(d_inode(parent), tmp);
···236236237237 if (dentry) {238238 spin_lock(&dentry->d_lock);239239- if (!d_unhashed(dentry) && d_really_is_positive(dentry)) {239239+ if (simple_positive(dentry)) {240240 dget_dlock(dentry);241241 __d_drop(dentry);242242 spin_unlock(&dentry->d_lock);
+3-8
fs/debugfs/inode.c
···4444 return inode;4545}46464747-static inline int debugfs_positive(struct dentry *dentry)4848-{4949- return d_really_is_positive(dentry) && !d_unhashed(dentry);5050-}5151-5247struct debugfs_mount_opts {5348 kuid_t uid;5449 kgid_t gid;···517522{518523 int ret = 0;519524520520- if (debugfs_positive(dentry)) {525525+ if (simple_positive(dentry)) {521526 dget(dentry);522527 if (d_is_dir(dentry))523528 ret = simple_rmdir(d_inode(parent), dentry);···597602 */598603 spin_lock(&parent->d_lock);599604 list_for_each_entry(child, &parent->d_subdirs, d_child) {600600- if (!debugfs_positive(child))605605+ if (!simple_positive(child))601606 continue;602607603608 /* perhaps simple_empty(child) makes more sense */···618623 * from d_subdirs. When releasing the parent->d_lock we can619624 * no longer trust that the next pointer is valid.620625 * Restart the loop. We'll skip this one with the621621- * debugfs_positive() check.626626+ * simple_positive() check.622627 */623628 goto loop;624629 }
···1771177117721772static void nfs_dentry_handle_enoent(struct dentry *dentry)17731773{17741774- if (d_really_is_positive(dentry) && !d_unhashed(dentry))17741774+ if (simple_positive(dentry))17751775 d_delete(dentry);17761776}17771777
+3-8
fs/tracefs/inode.c
···496496 return dentry;497497}498498499499-static inline int tracefs_positive(struct dentry *dentry)500500-{501501- return dentry->d_inode && !d_unhashed(dentry);502502-}503503-504499static int __tracefs_remove(struct dentry *dentry, struct dentry *parent)505500{506501 int ret = 0;507502508508- if (tracefs_positive(dentry)) {503503+ if (simple_positive(dentry)) {509504 if (dentry->d_inode) {510505 dget(dentry);511506 switch (dentry->d_inode->i_mode & S_IFMT) {···577582 */578583 spin_lock(&parent->d_lock);579584 list_for_each_entry(child, &parent->d_subdirs, d_child) {580580- if (!tracefs_positive(child))585585+ if (!simple_positive(child))581586 continue;582587583588 /* perhaps simple_empty(child) makes more sense */···598603 * from d_subdirs. When releasing the parent->d_lock we can599604 * no longer trust that the next pointer is valid.600605 * Restart the loop. We'll skip this one with the601601- * tracefs_positive() check.606606+ * simple_positive() check.602607 */603608 goto loop;604609 }