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
4444 return inode;
4545 }
4646
47−static inline int debugfs_positive(struct dentry *dentry)
48−{
49− return d_really_is_positive(dentry) && !d_unhashed(dentry);
50−}
51−
5247 struct debugfs_mount_opts {
5348 kuid_t uid;
5449 kgid_t gid;
@@ -522,7 +517,7 @@ static int __debugfs_remove(struct dentry *dentry, struct dentry *parent) · 467 unmodified lines
522517 {
523518 int ret = 0;
524519
525− if (debugfs_positive(dentry)) {
520+ if (simple_positive(dentry)) {
526521 dget(dentry);
527522 if (d_is_dir(dentry))
528523 ret = simple_rmdir(d_inode(parent), dentry);
@@ -602,7 +597,7 @@ void debugfs_remove_recursive(struct dentry *dentry) · 73 unmodified lines
602597 */
603598 spin_lock(&parent->d_lock);
604599 list_for_each_entry(child, &parent->d_subdirs, d_child) {
605− if (!debugfs_positive(child))
600+ if (!simple_positive(child))
606601 continue;
607602
608603 /* perhaps simple_empty(child) makes more sense */
@@ -623,7 +618,7 @@ void debugfs_remove_recursive(struct dentry *dentry) · 14 unmodified lines
623618 * from d_subdirs. When releasing the parent->d_lock we can
624619 * no longer trust that the next pointer is valid.
625620 * Restart the loop. We'll skip this one with the
626− * debugfs_positive() check.
621+ * simple_positive() check.
627622 */
628623 goto loop;
629624 }

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