VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
[linux-block.git] / fs / ecryptfs / file.c
index 6f4e659f508f303bdadcc8922b2cc1a1397bb51b..b07731e68c0b4d39cf75a5840033638cf37c123f 100644 (file)
@@ -230,7 +230,7 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
        }
        ecryptfs_set_file_lower(
                file, ecryptfs_inode_to_private(inode)->lower_file);
-       if (S_ISDIR(ecryptfs_dentry->d_inode->i_mode)) {
+       if (d_is_dir(ecryptfs_dentry)) {
                ecryptfs_printk(KERN_DEBUG, "This is a directory\n");
                mutex_lock(&crypt_stat->cs_mutex);
                crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED);