]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/lguest/lguest_user.c
Fix OpenSSH pty regression on close
[karo-tx-linux.git] / drivers / lguest / lguest_user.c
index c4c6113eb9a617a95f684ffa45ac87386b289095..30c60687d277c47efb20ea0a1bba4826444af09d 100644 (file)
@@ -339,6 +339,13 @@ static ssize_t write(struct file *file, const char __user *in,
        }
 }
 
+static int open(struct inode *inode, struct file *file)
+{
+       file->private_data = NULL;
+
+       return 0;
+}
+
 /*L:060
  * The final piece of interface code is the close() routine.  It reverses
  * everything done in initialize().  This is usually called because the
@@ -409,6 +416,7 @@ static int close(struct inode *inode, struct file *file)
  */
 static const struct file_operations lguest_fops = {
        .owner   = THIS_MODULE,
+       .open    = open,
        .release = close,
        .write   = write,
        .read    = read,