summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-26 21:12:48 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-26 21:12:48 +0400
commit380672698b8e64f0b5e418412b1ed370bd366428 (patch)
tree3644efbd10ab97f426542313add16099e774053f
parentcee4fbd6cd7608f6dad7539f39e9281125702a16 (diff)
downloadlinux-380672698b8e64f0b5e418412b1ed370bd366428.tar.xz
Revert "char: misc: assign file->private_data in all cases"
This reverts commit 585d98e00ba7a5e2abe65f7a1eff631cb612289b, as it breaks the FUSE misc driver. Reported-by: Sedat Dilek <sedat.dilek@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/char/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index fd504d358596..190d4423653f 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -143,8 +143,8 @@ static int misc_open(struct inode * inode, struct file * file)
err = 0;
old_fops = file->f_op;
file->f_op = new_fops;
- file->private_data = c;
if (file->f_op->open) {
+ file->private_data = c;
err=file->f_op->open(inode,file);
if (err) {
fops_put(file->f_op);