From: David Howells Date: Thu, 5 Mar 2015 12:46:49 +0000 (+0000) Subject: VFS: Fix up debugfs to use d_is_dir() in place of S_ISDIR() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=7ceab50c0be56cf1bbaf2b3dd1c6cda80e5335fb;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Al Viro --- diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 96400ab42d13..26856ecdea5e 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -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);