diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-04 22:36:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-04 22:36:06 -0400 |
commit | 1dc51b8288007753ad7cd7d08bb8fa930fc8bb10 (patch) | |
tree | 0616c0ff7d877e64d9c248a6cdff074eae258840 /fs/debugfs | |
parent | 9b284cbdb5de3b8871014f8290d1b540e5181c21 (diff) | |
parent | 0f1db7dee200127da4c07928189748918c312031 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs updates from Al Viro:
"Assorted VFS fixes and related cleanups (IMO the most interesting in
that part are f_path-related things and Eric's descriptor-related
stuff). UFS regression fixes (it got broken last cycle). 9P fixes.
fs-cache series, DAX patches, Jan's file_remove_suid() work"
[ I'd say this is much more than "fixes and related cleanups". The
file_table locking rule change by Eric Dumazet is a rather big and
fundamental update even if the patch isn't huge. - Linus ]
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (49 commits)
9p: cope with bogus responses from server in p9_client_{read,write}
p9_client_write(): avoid double p9_free_req()
9p: forgetting to cancel request on interrupted zero-copy RPC
dax: bdev_direct_access() may sleep
block: Add support for DAX reads/writes to block devices
dax: Use copy_from_iter_nocache
dax: Add block size note to documentation
fs/file.c: __fget() and dup2() atomicity rules
fs/file.c: don't acquire files->file_lock in fd_install()
fs:super:get_anon_bdev: fix race condition could cause dev exceed its upper limitation
vfs: avoid creation of inode number 0 in get_next_ino
namei: make set_root_rcu() return void
make simple_positive() public
ufs: use dir_pages instead of ufs_dir_pages()
pagemap.h: move dir_pages() over there
remove the pointless include of lglock.h
fs: cleanup slight list_entry abuse
xfs: Correctly lock inode when removing suid and file capabilities
fs: Call security_ops->inode_killpriv on truncate
fs: Provide function telling whether file_remove_privs() will do anything
...
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 d6d1cf004123..c711be8d6a3c 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 | } |