Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1628126 > unrolled thread

[PATCH] fsnotify: remove a stray unlock

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2017-04-21 13:00 +0200
Last post2017-04-24 16:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] fsnotify: remove a stray unlock Dan Carpenter <dan.carpenter@oracle.com> - 2017-04-21 13:00 +0200
    Re: [PATCH] fsnotify: remove a stray unlock Jan Kara <jack@suse.cz> - 2017-04-24 16:50 +0200

#1628126 — [PATCH] fsnotify: remove a stray unlock

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-04-21 13:00 +0200
Subject[PATCH] fsnotify: remove a stray unlock
Message-ID<tyEs9-4NC-7@gated-at.bofh.it>
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;

[toc] | [next] | [standalone]


#1629648

FromJan Kara <jack@suse.cz>
Date2017-04-24 16:50 +0200
Message-ID<tzNtn-8dF-1@gated-at.bofh.it>
In reply to#1628126
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web