mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
VFS: Fix up debugfs to use d_is_dir() in place of S_ISDIR()
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>
This commit is contained in:
parent
698934df8b
commit
7ceab50c0b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user