diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2015-05-18 10:10:34 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-06-23 18:02:01 -0400 |
| commit | dc3f4198eac14e52a98dfc79cd84b45e280f59cd (patch) | |
| tree | 1fa6e8ec571132471e903a6a1d34accacfa9ad33 /fs/debugfs | |
| parent | 5d754ced150e392c7b5dbf73ed2feddb60cd579a (diff) | |
make simple_positive() public
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/debugfs')
| -rw-r--r-- | fs/debugfs/inode.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 7eaec88ea970..ef86ad6bdc3e 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
| @@ -44,11 +44,6 @@ static struct inode *debugfs_get_inode(struct super_block *sb) | |||
| 44 | return inode; | 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 | struct debugfs_mount_opts { | 47 | struct 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) | |||
| 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) | |||
| 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) | |||
| 623 | * from d_subdirs. When releasing the parent->d_lock we can | 618 | * 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 the | 620 | * 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 | } |
