linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fsnotify: remove a stray unlock
@ 2017-04-21 10:52 Dan Carpenter
  2017-04-24 14:41 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-04-21 10:52 UTC (permalink / raw)
  To: Jan Kara; +Cc: Miklos Szeredi, Amir Goldstein, linux-kernel, kernel-janitors

We recently shifted this code around, so we're no longer holding the
lock on this path.

Fixes: 755b5bc681eb ("fsnotify: Remove indirection from mark list addition")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index 55955ded338d..9991f8826734 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -603,7 +603,6 @@ int fsnotify_add_mark_locked(struct fsnotify_mark *mark, struct inode *inode,
 			 FSNOTIFY_MARK_FLAG_ATTACHED);
 	list_del_init(&mark->g_list);
 	atomic_dec(&group->num_marks);
-	spin_unlock(&mark->lock);
 
 	fsnotify_put_mark(mark);
 	return ret;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fsnotify: remove a stray unlock
  2017-04-21 10:52 [PATCH] fsnotify: remove a stray unlock Dan Carpenter
@ 2017-04-24 14:41 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2017-04-24 14:41 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Jan Kara, Miklos Szeredi, Amir Goldstein, linux-kernel, kernel-janitors

On Fri 21-04-17 13:52:20, Dan Carpenter wrote:
> We recently shifted this code around, so we're no longer holding the
> lock on this path.
> 
> Fixes: 755b5bc681eb ("fsnotify: Remove indirection from mark list addition")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks! I've merged this patch.

								Honza
> 
> diff --git a/fs/notify/mark.c b/fs/notify/mark.c
> index 55955ded338d..9991f8826734 100644
> --- a/fs/notify/mark.c
> +++ b/fs/notify/mark.c
> @@ -603,7 +603,6 @@ int fsnotify_add_mark_locked(struct fsnotify_mark *mark, struct inode *inode,
>  			 FSNOTIFY_MARK_FLAG_ATTACHED);
>  	list_del_init(&mark->g_list);
>  	atomic_dec(&group->num_marks);
> -	spin_unlock(&mark->lock);
>  
>  	fsnotify_put_mark(mark);
>  	return ret;
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-24 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-21 10:52 [PATCH] fsnotify: remove a stray unlock Dan Carpenter
2017-04-24 14:41 ` Jan Kara

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).