History

make simple_positive() public

Al Viro committed 11 years ago

Commit dc3f4191 parent 5d754ce14 files · +25 −60Browse files

Showing the changes to fs/debugfs (1 of 14 files). Show all

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t