aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Vagin <avagin@openvz.org>2011-03-22 19:35:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-22 20:44:17 -0400
commitb12d12596992f608f5506a8dabe4d1299594bd1e (patch)
treeaca8883d4660d3dec0590de162c5b9fa7e457ee1
parente91f90bb0bb10be9cc8efd09a3cf4ecffcad0db1 (diff)
fs/devpts/inode.c: correctly check d_alloc_name() return code in devpts_pty_new()
d_alloc_name return NULL in case error, but we expect errno in devpts_pty_new. Addresses http://bugzilla.openvz.org/show_bug.cgi?id=1758 Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/devpts/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index c6bd815dc794..2f27e578d466 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -502,7 +502,7 @@ int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty)
502 mutex_lock(&root->d_inode->i_mutex); 502 mutex_lock(&root->d_inode->i_mutex);
503 503
504 dentry = d_alloc_name(root, s); 504 dentry = d_alloc_name(root, s);
505 if (!IS_ERR(dentry)) { 505 if (dentry) {
506 d_add(dentry, inode); 506 d_add(dentry, inode);
507 fsnotify_create(root->d_inode, dentry); 507 fsnotify_create(root->d_inode, dentry);
508 } else { 508 } else {