linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Kepplinger <martink@posteo.de>
To: giedriuswork@gmail.com
Cc: miklos@szeredi.hu, fuse-devel@lists.sourceforge.net,
	thierry.reding@gmail.com, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org,
	Martin Kepplinger <martink@posteo.de>
Subject: [PATCH] fuse: Don't check for file->private_data on open(). It is set by the core.
Date: Wed, 12 Nov 2014 19:56:21 +0100	[thread overview]
Message-ID: <1415818581-27476-1-git-send-email-martink@posteo.de> (raw)
In-Reply-To: <5463979C.6090600@gmail.com>

The miscdevice core now sets file->private_data to the struct miscdevice
so don't fail when this is not NULL.

Reported-by: Giedrius Statkevicius <giedriuswork@gmail.com>
Signed-off-by: Martin Kepplinger <martink@posteo.de>
---
sorry, I can't read ;) Is this a fix for your problem (instead of the first
patch)?

in case of fuse_ctl_add_conn(fc) failing things should proceed as before.

 fs/fuse/inode.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 03246cd..a97a475 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1092,9 +1092,6 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
 	}
 
 	mutex_lock(&fuse_mutex);
-	err = -EINVAL;
-	if (file->private_data)
-		goto err_unlock;
 
 	err = fuse_ctl_add_conn(fc);
 	if (err)
@@ -1117,6 +1114,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
 	return 0;
 
  err_unlock:
+	file->private_data = NULL;
 	mutex_unlock(&fuse_mutex);
  err_free_init_req:
 	fuse_request_free(init_req);
-- 
1.7.10.4


  reply	other threads:[~2014-11-12 18:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 20:27 [Bisected] Regression: cpu stuck in gvfsd-fuse, can't shutdown Giedrius Statkevicius
2014-11-11 21:05 ` Greg KH
2014-11-11 21:44   ` Giedrius Statkevicius
2014-11-12 11:26     ` Thierry Reding
2014-11-12 16:31       ` [PATCH] fuse: don't check for file->private_data on open() Martin Kepplinger
2014-11-12 16:41         ` Martin Kepplinger
2014-11-12 17:23         ` Giedrius Statkevicius
2014-11-12 18:56           ` Martin Kepplinger [this message]
2014-11-13  9:40         ` Miklos Szeredi
2014-11-13 10:05           ` Martin Kepplinger
2014-11-13 10:53             ` Miklos Szeredi
2014-11-13 11:13               ` Martin Kepplinger
2014-11-13 15:34                 ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1415818581-27476-1-git-send-email-martink@posteo.de \
    --to=martink@posteo.de \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=giedriuswork@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).