Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
* Non-dir dentry can hold lower dentry from previous
* location.
*/
- if (oe->numlower && S_ISDIR(dentry->d_inode->i_mode))
+ if (oe->numlower && d_is_dir(dentry))
type |= __OVL_PATH_MERGE;
} else {
if (oe->numlower > 1)
pr_err("overlayfs: filesystem on '%s' not supported\n", name);
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);
goto out_put;
}