[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121118142920.GG7306@mtj.dyndns.org>
Date: Sun, 18 Nov 2012 06:29:20 -0800
From: Tejun Heo <tj@...nel.org>
To: David Herrmann <dh.herrmann@...glemail.com>
Cc: fuse-devel@...ts.sourceforge.net,
Miklos Szeredi <miklos@...redi.hu>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] cuse: use mutex as registration lock instead of
spinlocks
Hello, David.
On Sat, Nov 17, 2012 at 12:45:47PM +0100, David Herrmann wrote:
> We need to check for name-collisions during cuse-device registration. To
> avoid race-conditions, this needs to be protected during the whole device
> registration. Therefore, replace the spinlocks by mutexes first so we can
> safely extend the locked regions to include more expensive or sleeping
> code paths.
>
> Signed-off-by: David Herrmann <dh.herrmann@...glemail.com>
> @@ -114,14 +113,18 @@ static int cuse_open(struct inode *inode, struct file *file)
> int rc;
>
> /* look up and get the connection */
> - spin_lock(&cuse_lock);
> + rc = mutex_lock_interruptible(&cuse_lock);
Well, the above can't hurt but it doesn't help anything either given
the narrow scope of the lock. Eh well, I guess it's okay either way.
Acked-by: Tejun Heo <tj@...nel.org>
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists