summaryrefslogtreecommitdiffstats
path: root/kernel/fs/overlayfs/readdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/overlayfs/readdir.c')
-rw-r--r--kernel/fs/overlayfs/readdir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/fs/overlayfs/readdir.c b/kernel/fs/overlayfs/readdir.c
index 70e9af551..adcb1398c 100644
--- a/kernel/fs/overlayfs/readdir.c
+++ b/kernel/fs/overlayfs/readdir.c
@@ -571,7 +571,8 @@ void ovl_cleanup_whiteouts(struct dentry *upper, struct list_head *list)
(int) PTR_ERR(dentry));
continue;
}
- ovl_cleanup(upper->d_inode, dentry);
+ if (dentry->d_inode)
+ ovl_cleanup(upper->d_inode, dentry);
dput(dentry);
}
mutex_unlock(&upper->d_inode->i_mutex);