Skip to content

Commit

Permalink
VFS: Fix up debugfs to use d_is_dir() in place of S_ISDIR()
Browse files Browse the repository at this point in the history
Fix up debugfs to use d_is_dir(dentry) in place of
S_ISDIR(dentry->d_inode->i_mode).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
David Howells authored and Al Viro committed Apr 15, 2015
1 parent 698934d commit 7ceab50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/debugfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ static int __debugfs_remove(struct dentry *dentry, struct dentry *parent)

if (debugfs_positive(dentry)) {
dget(dentry);
if (S_ISDIR(dentry->d_inode->i_mode))
if (d_is_dir(dentry))
ret = simple_rmdir(parent->d_inode, dentry);
else
simple_unlink(parent->d_inode, dentry);
Expand Down

0 comments on commit 7ceab50

Please sign in to comment.