浏览代码

ovl: use d_is_dir()

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Miklos Szeredi 8 年之前
父节点
当前提交
2b8c30e9ef
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      fs/overlayfs/super.c

+ 2 - 2
fs/overlayfs/super.c

@@ -82,7 +82,7 @@ enum ovl_path_type ovl_path_type(struct dentry *dentry)
 		 * Non-dir dentry can hold lower dentry from previous
 		 * Non-dir dentry can hold lower dentry from previous
 		 * location.
 		 * location.
 		 */
 		 */
-		if (oe->numlower && S_ISDIR(dentry->d_inode->i_mode))
+		if (oe->numlower && d_is_dir(dentry))
 			type |= __OVL_PATH_MERGE;
 			type |= __OVL_PATH_MERGE;
 	} else {
 	} else {
 		if (oe->numlower > 1)
 		if (oe->numlower > 1)
@@ -955,7 +955,7 @@ static int ovl_mount_dir_noesc(const char *name, struct path *path)
 		pr_err("overlayfs: filesystem on '%s' not supported\n", name);
 		pr_err("overlayfs: filesystem on '%s' not supported\n", name);
 		goto out_put;
 		goto out_put;
 	}
 	}
-	if (!S_ISDIR(path->dentry->d_inode->i_mode)) {
+	if (!d_is_dir(path->dentry)) {
 		pr_err("overlayfs: '%s' not a directory\n", name);
 		pr_err("overlayfs: '%s' not a directory\n", name);
 		goto out_put;
 		goto out_put;
 	}
 	}