summaryrefslogtreecommitdiff
path: root/fs/devpts
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-09-27 10:34:19 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-09-27 10:34:19 -0300
commit1c29f4306f557ef5d9ed515ec8881f4d1735b058 (patch)
tree1359b9f8403af67e35bbbaae36e2b60c9bb3d2da /fs/devpts
parent5b465b045af3a649a89b8a5c5bfdece20ffc0345 (diff)
Linux-libre 4.7.5-gnupck-4.7.5-gnu
Diffstat (limited to 'fs/devpts')
-rw-r--r--fs/devpts/inode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 37c134a13..cc543fea5 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -584,7 +584,8 @@ struct dentry *devpts_pty_new(struct pts_fs_info *fsi, int index, void *priv)
*/
void *devpts_get_priv(struct dentry *dentry)
{
- WARN_ON_ONCE(dentry->d_sb->s_magic != DEVPTS_SUPER_MAGIC);
+ if (dentry->d_sb->s_magic != DEVPTS_SUPER_MAGIC)
+ return NULL;
return dentry->d_fsdata;
}