Showing the changes to fs/debugfs (1 of 14 files). Show all
Unified · Split
| @@ -44,11 +44,6 @@ static struct inode *debugfs_get_inode(struct super_block *sb) · 43 unmodified lines | ||
| 44 | 44 | return inode; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | −static inline int debugfs_positive(struct dentry *dentry) | |
| 48 | −{ | |
| 49 | − return d_really_is_positive(dentry) && !d_unhashed(dentry); | |
| 50 | −} | |
| 51 | − | |
| 52 | 47 | struct debugfs_mount_opts { |
| 53 | 48 | kuid_t uid; |
| 54 | 49 | kgid_t gid; |
| @@ -522,7 +517,7 @@ static int __debugfs_remove(struct dentry *dentry, struct dentry *parent) · 467 unmodified lines | ||
| 522 | 517 | { |
| 523 | 518 | int ret = 0; |
| 524 | 519 | |
| 525 | − if (debugfs_positive(dentry)) { | |
| 520 | + if (simple_positive(dentry)) { | |
| 526 | 521 | dget(dentry); |
| 527 | 522 | if (d_is_dir(dentry)) |
| 528 | 523 | ret = simple_rmdir(d_inode(parent), dentry); |
| @@ -602,7 +597,7 @@ void debugfs_remove_recursive(struct dentry *dentry) · 73 unmodified lines | ||
| 602 | 597 | */ |
| 603 | 598 | spin_lock(&parent->d_lock); |
| 604 | 599 | list_for_each_entry(child, &parent->d_subdirs, d_child) { |
| 605 | − if (!debugfs_positive(child)) | |
| 600 | + if (!simple_positive(child)) | |
| 606 | 601 | continue; |
| 607 | 602 | |
| 608 | 603 | /* perhaps simple_empty(child) makes more sense */ |
| @@ -623,7 +618,7 @@ void debugfs_remove_recursive(struct dentry *dentry) · 14 unmodified lines | ||
| 623 | 618 | * from d_subdirs. When releasing the parent->d_lock we can |
| 624 | 619 | * no longer trust that the next pointer is valid. |
| 625 | 620 | * Restart the loop. We'll skip this one with the |
| 626 | − * debugfs_positive() check. | |
| 621 | + * simple_positive() check. | |
| 627 | 622 | */ |
| 628 | 623 | goto loop; |
| 629 | 624 | } |