diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-12-16 05:02:56 -0500 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-12-16 05:02:56 -0500 |
commit | 2b8c30e9ef1492c34099b97365115504f6cd6995 (patch) | |
tree | cf6b4a4bdac41a176a22e5f147b06d0244c1716a | |
parent | 8ee6059c58ea525f76b4efb98f8f66845f697efc (diff) |
ovl: use d_is_dir()
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
-rw-r--r-- | fs/overlayfs/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index a19fbcde16bd..212e746320b3 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c | |||
@@ -82,7 +82,7 @@ enum ovl_path_type ovl_path_type(struct dentry *dentry) | |||
82 | * Non-dir dentry can hold lower dentry from previous | 82 | * Non-dir dentry can hold lower dentry from previous |
83 | * location. | 83 | * location. |
84 | */ | 84 | */ |
85 | if (oe->numlower && S_ISDIR(dentry->d_inode->i_mode)) | 85 | if (oe->numlower && d_is_dir(dentry)) |
86 | type |= __OVL_PATH_MERGE; | 86 | type |= __OVL_PATH_MERGE; |
87 | } else { | 87 | } else { |
88 | if (oe->numlower > 1) | 88 | if (oe->numlower > 1) |
@@ -955,7 +955,7 @@ static int ovl_mount_dir_noesc(const char *name, struct path *path) | |||
955 | pr_err("overlayfs: filesystem on '%s' not supported\n", name); | 955 | pr_err("overlayfs: filesystem on '%s' not supported\n", name); |
956 | goto out_put; | 956 | goto out_put; |
957 | } | 957 | } |
958 | if (!S_ISDIR(path->dentry->d_inode->i_mode)) { | 958 | if (!d_is_dir(path->dentry)) { |
959 | pr_err("overlayfs: '%s' not a directory\n", name); | 959 | pr_err("overlayfs: '%s' not a directory\n", name); |
960 | goto out_put; | 960 | goto out_put; |
961 | } | 961 | } |