All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: fix double unlock in xfs_swap_extents()
@ 2009-05-08  1:13 ` Felix Blyakher
  0 siblings, 0 replies; 12+ messages in thread
From: Felix Blyakher @ 2009-05-08  1:13 UTC (permalink / raw)
  To: xfs-VZNHf3L845pBDgjK7y7TUQ
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	a.beregalov-Re5JQEeQqe8AvxtiuMwx3w,
	kernel-testers-u79uwXL29TY76Z2rM5mHXA, Felix Blyakher

Regreesion from commit ef8f7fc, which rearranged the code in
xfs_swap_extents() leading to double unlock of xfs inode iolock.
That resulted in xfs_fsr deadlocking itself on platforms, which
don't handle double unlock of rw_semaphore nicely. It caused the
count go negative, which represents the write holder, without
really having one. ia64 is one of the platforms where deadlock
was easily reproduced and the fix was tested.

Signed-off-by: Felix Blyakher <felixb-sJ/iWh9BUns@public.gmane.org>
---
 fs/xfs/xfs_dfrag.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
index e6d839b..7465f9e 100644
--- a/fs/xfs/xfs_dfrag.c
+++ b/fs/xfs/xfs_dfrag.c
@@ -347,13 +347,15 @@ xfs_swap_extents(
 
 	error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
 
-out_unlock:
-	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
-	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
 out:
 	kmem_free(tempifp);
 	return error;
 
+out_unlock:
+	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+	goto out;
+
 out_trans_cancel:
 	xfs_trans_cancel(tp, 0);
 	goto out_unlock;
-- 
1.5.4.rc3

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

* [PATCH] xfs: fix double unlock in xfs_swap_extents()
@ 2009-05-08  1:13 ` Felix Blyakher
  0 siblings, 0 replies; 12+ messages in thread
From: Felix Blyakher @ 2009-05-08  1:13 UTC (permalink / raw)
  To: xfs; +Cc: kernel-testers, linux-kernel, a.beregalov

Regreesion from commit ef8f7fc, which rearranged the code in
xfs_swap_extents() leading to double unlock of xfs inode iolock.
That resulted in xfs_fsr deadlocking itself on platforms, which
don't handle double unlock of rw_semaphore nicely. It caused the
count go negative, which represents the write holder, without
really having one. ia64 is one of the platforms where deadlock
was easily reproduced and the fix was tested.

Signed-off-by: Felix Blyakher <felixb@sgi.com>
---
 fs/xfs/xfs_dfrag.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
index e6d839b..7465f9e 100644
--- a/fs/xfs/xfs_dfrag.c
+++ b/fs/xfs/xfs_dfrag.c
@@ -347,13 +347,15 @@ xfs_swap_extents(
 
 	error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
 
-out_unlock:
-	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
-	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
 out:
 	kmem_free(tempifp);
 	return error;
 
+out_unlock:
+	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+	goto out;
+
 out_trans_cancel:
 	xfs_trans_cancel(tp, 0);
 	goto out_unlock;
-- 
1.5.4.rc3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* [PATCH] xfs: fix double unlock in xfs_swap_extents()
@ 2009-05-08  1:13 ` Felix Blyakher
  0 siblings, 0 replies; 12+ messages in thread
From: Felix Blyakher @ 2009-05-08  1:13 UTC (permalink / raw)
  To: xfs; +Cc: linux-kernel, a.beregalov, kernel-testers, Felix Blyakher

Regreesion from commit ef8f7fc, which rearranged the code in
xfs_swap_extents() leading to double unlock of xfs inode iolock.
That resulted in xfs_fsr deadlocking itself on platforms, which
don't handle double unlock of rw_semaphore nicely. It caused the
count go negative, which represents the write holder, without
really having one. ia64 is one of the platforms where deadlock
was easily reproduced and the fix was tested.

Signed-off-by: Felix Blyakher <felixb@sgi.com>
---
 fs/xfs/xfs_dfrag.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
index e6d839b..7465f9e 100644
--- a/fs/xfs/xfs_dfrag.c
+++ b/fs/xfs/xfs_dfrag.c
@@ -347,13 +347,15 @@ xfs_swap_extents(
 
 	error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
 
-out_unlock:
-	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
-	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
 out:
 	kmem_free(tempifp);
 	return error;
 
+out_unlock:
+	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+	goto out;
+
 out_trans_cancel:
 	xfs_trans_cancel(tp, 0);
 	goto out_unlock;
-- 
1.5.4.rc3


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

* Re: [PATCH] xfs: fix double unlock in xfs_swap_extents()
  2009-05-08  1:13 ` Felix Blyakher
  (?)
@ 2009-05-08  2:57     ` Eric Sandeen
  -1 siblings, 0 replies; 12+ messages in thread
From: Eric Sandeen @ 2009-05-08  2:57 UTC (permalink / raw)
  To: Felix Blyakher
  Cc: xfs-VZNHf3L845pBDgjK7y7TUQ, kernel-testers-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	a.beregalov-Re5JQEeQqe8AvxtiuMwx3w

Felix Blyakher wrote:
> Regreesion from commit ef8f7fc, which rearranged the code in
> xfs_swap_extents() leading to double unlock of xfs inode iolock.
> That resulted in xfs_fsr deadlocking itself on platforms, which
> don't handle double unlock of rw_semaphore nicely. It caused the
> count go negative, which represents the write holder, without
> really having one. ia64 is one of the platforms where deadlock
> was easily reproduced and the fix was tested.
> 
> Signed-off-by: Felix Blyakher <felixb-sJ/iWh9BUns@public.gmane.org>

Also-written-by: Eric Sandeen <sandeen-+82itfer+wXR7s880joybQ@public.gmane.org>
Independently-arrived-at-by: Eric Sandeen <sandeen-+82itfer+wXR7s880joybQ@public.gmane.org>

;)

But seriously ...

Reviewed-by: Eric Sandeen <sandeen-+82itfer+wXR7s880joybQ@public.gmane.org>

> ---
>  fs/xfs/xfs_dfrag.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
> index e6d839b..7465f9e 100644
> --- a/fs/xfs/xfs_dfrag.c
> +++ b/fs/xfs/xfs_dfrag.c
> @@ -347,13 +347,15 @@ xfs_swap_extents(
>  
>  	error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
>  
> -out_unlock:
> -	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> -	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>  out:
>  	kmem_free(tempifp);
>  	return error;
>  
> +out_unlock:
> +	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> +	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> +	goto out;
> +
>  out_trans_cancel:
>  	xfs_trans_cancel(tp, 0);
>  	goto out_unlock;

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

* Re: [PATCH] xfs: fix double unlock in xfs_swap_extents()
@ 2009-05-08  2:57     ` Eric Sandeen
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Sandeen @ 2009-05-08  2:57 UTC (permalink / raw)
  To: Felix Blyakher; +Cc: kernel-testers, linux-kernel, a.beregalov, xfs

Felix Blyakher wrote:
> Regreesion from commit ef8f7fc, which rearranged the code in
> xfs_swap_extents() leading to double unlock of xfs inode iolock.
> That resulted in xfs_fsr deadlocking itself on platforms, which
> don't handle double unlock of rw_semaphore nicely. It caused the
> count go negative, which represents the write holder, without
> really having one. ia64 is one of the platforms where deadlock
> was easily reproduced and the fix was tested.
> 
> Signed-off-by: Felix Blyakher <felixb@sgi.com>

Also-written-by: Eric Sandeen <sandeen@sandeen.net>
Independently-arrived-at-by: Eric Sandeen <sandeen@sandeen.net>

;)

But seriously ...

Reviewed-by: Eric Sandeen <sandeen@sandeen.net>

> ---
>  fs/xfs/xfs_dfrag.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
> index e6d839b..7465f9e 100644
> --- a/fs/xfs/xfs_dfrag.c
> +++ b/fs/xfs/xfs_dfrag.c
> @@ -347,13 +347,15 @@ xfs_swap_extents(
>  
>  	error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
>  
> -out_unlock:
> -	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> -	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>  out:
>  	kmem_free(tempifp);
>  	return error;
>  
> +out_unlock:
> +	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> +	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> +	goto out;
> +
>  out_trans_cancel:
>  	xfs_trans_cancel(tp, 0);
>  	goto out_unlock;

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] xfs: fix double unlock in xfs_swap_extents()
@ 2009-05-08  2:57     ` Eric Sandeen
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Sandeen @ 2009-05-08  2:57 UTC (permalink / raw)
  To: Felix Blyakher; +Cc: xfs, kernel-testers, linux-kernel, a.beregalov

Felix Blyakher wrote:
> Regreesion from commit ef8f7fc, which rearranged the code in
> xfs_swap_extents() leading to double unlock of xfs inode iolock.
> That resulted in xfs_fsr deadlocking itself on platforms, which
> don't handle double unlock of rw_semaphore nicely. It caused the
> count go negative, which represents the write holder, without
> really having one. ia64 is one of the platforms where deadlock
> was easily reproduced and the fix was tested.
> 
> Signed-off-by: Felix Blyakher <felixb@sgi.com>

Also-written-by: Eric Sandeen <sandeen@sandeen.net>
Independently-arrived-at-by: Eric Sandeen <sandeen@sandeen.net>

;)

But seriously ...

Reviewed-by: Eric Sandeen <sandeen@sandeen.net>

> ---
>  fs/xfs/xfs_dfrag.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
> index e6d839b..7465f9e 100644
> --- a/fs/xfs/xfs_dfrag.c
> +++ b/fs/xfs/xfs_dfrag.c
> @@ -347,13 +347,15 @@ xfs_swap_extents(
>  
>  	error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
>  
> -out_unlock:
> -	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> -	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>  out:
>  	kmem_free(tempifp);
>  	return error;
>  
> +out_unlock:
> +	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> +	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> +	goto out;
> +
>  out_trans_cancel:
>  	xfs_trans_cancel(tp, 0);
>  	goto out_unlock;


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

* Re: [PATCH] xfs: fix double unlock in xfs_swap_extents()
  2009-05-08  2:57     ` Eric Sandeen
  (?)
@ 2009-05-08  5:20         ` Felix Blyakher
  -1 siblings, 0 replies; 12+ messages in thread
From: Felix Blyakher @ 2009-05-08  5:20 UTC (permalink / raw)
  To: Eric Sandeen
  Cc: xfs-VZNHf3L845pBDgjK7y7TUQ, kernel-testers-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	a.beregalov-Re5JQEeQqe8AvxtiuMwx3w


On May 7, 2009, at 9:57 PM, Eric Sandeen wrote:

> Felix Blyakher wrote:
>> Regreesion from commit ef8f7fc, which rearranged the code in
>> xfs_swap_extents() leading to double unlock of xfs inode iolock.
>> That resulted in xfs_fsr deadlocking itself on platforms, which
>> don't handle double unlock of rw_semaphore nicely. It caused the
>> count go negative, which represents the write holder, without
>> really having one. ia64 is one of the platforms where deadlock
>> was easily reproduced and the fix was tested.
>>
>> Signed-off-by: Felix Blyakher <felixb-sJ/iWh9BUns@public.gmane.org>
>
> Also-written-by: Eric Sandeen <sandeen-+82itfer+wXR7s880joybQ@public.gmane.org>
> Independently-arrived-at-by: Eric Sandeen <sandeen-+82itfer+wXR7s880joybQ@public.gmane.org>

That would make it: Signed-off-by: Eric Sandeen <sandeen-+82itfer+wXR7s880joybQ@public.gmane.org> :)

> ;)
>
> But seriously ...

Seriously.

Felix

>
>
> Reviewed-by: Eric Sandeen <sandeen-+82itfer+wXR7s880joybQ@public.gmane.org>
>
>> ---
>> fs/xfs/xfs_dfrag.c |    8 +++++---
>> 1 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
>> index e6d839b..7465f9e 100644
>> --- a/fs/xfs/xfs_dfrag.c
>> +++ b/fs/xfs/xfs_dfrag.c
>> @@ -347,13 +347,15 @@ xfs_swap_extents(
>>
>> 	error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
>>
>> -out_unlock:
>> -	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>> -	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>> out:
>> 	kmem_free(tempifp);
>> 	return error;
>>
>> +out_unlock:
>> +	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>> +	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>> +	goto out;
>> +
>> out_trans_cancel:
>> 	xfs_trans_cancel(tp, 0);
>> 	goto out_unlock;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux- 
> kernel" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH] xfs: fix double unlock in xfs_swap_extents()
@ 2009-05-08  5:20         ` Felix Blyakher
  0 siblings, 0 replies; 12+ messages in thread
From: Felix Blyakher @ 2009-05-08  5:20 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: kernel-testers, linux-kernel, a.beregalov, xfs


On May 7, 2009, at 9:57 PM, Eric Sandeen wrote:

> Felix Blyakher wrote:
>> Regreesion from commit ef8f7fc, which rearranged the code in
>> xfs_swap_extents() leading to double unlock of xfs inode iolock.
>> That resulted in xfs_fsr deadlocking itself on platforms, which
>> don't handle double unlock of rw_semaphore nicely. It caused the
>> count go negative, which represents the write holder, without
>> really having one. ia64 is one of the platforms where deadlock
>> was easily reproduced and the fix was tested.
>>
>> Signed-off-by: Felix Blyakher <felixb@sgi.com>
>
> Also-written-by: Eric Sandeen <sandeen@sandeen.net>
> Independently-arrived-at-by: Eric Sandeen <sandeen@sandeen.net>

That would make it: Signed-off-by: Eric Sandeen <sandeen@sandeen.net> :)

> ;)
>
> But seriously ...

Seriously.

Felix

>
>
> Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
>
>> ---
>> fs/xfs/xfs_dfrag.c |    8 +++++---
>> 1 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
>> index e6d839b..7465f9e 100644
>> --- a/fs/xfs/xfs_dfrag.c
>> +++ b/fs/xfs/xfs_dfrag.c
>> @@ -347,13 +347,15 @@ xfs_swap_extents(
>>
>> 	error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
>>
>> -out_unlock:
>> -	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>> -	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>> out:
>> 	kmem_free(tempifp);
>> 	return error;
>>
>> +out_unlock:
>> +	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>> +	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>> +	goto out;
>> +
>> out_trans_cancel:
>> 	xfs_trans_cancel(tp, 0);
>> 	goto out_unlock;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux- 
> kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] xfs: fix double unlock in xfs_swap_extents()
@ 2009-05-08  5:20         ` Felix Blyakher
  0 siblings, 0 replies; 12+ messages in thread
From: Felix Blyakher @ 2009-05-08  5:20 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs, kernel-testers, linux-kernel, a.beregalov


On May 7, 2009, at 9:57 PM, Eric Sandeen wrote:

> Felix Blyakher wrote:
>> Regreesion from commit ef8f7fc, which rearranged the code in
>> xfs_swap_extents() leading to double unlock of xfs inode iolock.
>> That resulted in xfs_fsr deadlocking itself on platforms, which
>> don't handle double unlock of rw_semaphore nicely. It caused the
>> count go negative, which represents the write holder, without
>> really having one. ia64 is one of the platforms where deadlock
>> was easily reproduced and the fix was tested.
>>
>> Signed-off-by: Felix Blyakher <felixb@sgi.com>
>
> Also-written-by: Eric Sandeen <sandeen@sandeen.net>
> Independently-arrived-at-by: Eric Sandeen <sandeen@sandeen.net>

That would make it: Signed-off-by: Eric Sandeen <sandeen@sandeen.net> :)

> ;)
>
> But seriously ...

Seriously.

Felix

>
>
> Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
>
>> ---
>> fs/xfs/xfs_dfrag.c |    8 +++++---
>> 1 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
>> index e6d839b..7465f9e 100644
>> --- a/fs/xfs/xfs_dfrag.c
>> +++ b/fs/xfs/xfs_dfrag.c
>> @@ -347,13 +347,15 @@ xfs_swap_extents(
>>
>> 	error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
>>
>> -out_unlock:
>> -	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>> -	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>> out:
>> 	kmem_free(tempifp);
>> 	return error;
>>
>> +out_unlock:
>> +	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>> +	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
>> +	goto out;
>> +
>> out_trans_cancel:
>> 	xfs_trans_cancel(tp, 0);
>> 	goto out_unlock;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux- 
> kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


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

* Re: [PATCH] xfs: fix double unlock in xfs_swap_extents()
  2009-05-08  1:13 ` Felix Blyakher
  (?)
@ 2009-05-08  6:28     ` Christoph Hellwig
  -1 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2009-05-08  6:28 UTC (permalink / raw)
  To: Felix Blyakher
  Cc: xfs-VZNHf3L845pBDgjK7y7TUQ, kernel-testers-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	a.beregalov-Re5JQEeQqe8AvxtiuMwx3w

The patch looks good, but a little nitpick:

On Thu, May 07, 2009 at 08:13:22PM -0500, Felix Blyakher wrote:
>  out:
>  	kmem_free(tempifp);
>  	return error;
>  
> +out_unlock:
> +	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> +	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> +	goto out;
> +
>  out_trans_cancel:
>  	xfs_trans_cancel(tp, 0);
>  	goto out_unlock;

this would be more readable as:

 out_trans_cancel:
	xfs_trans_cancel(tp, 0);
 out_unlock:
	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
	goto out;

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

* Re: [PATCH] xfs: fix double unlock in xfs_swap_extents()
@ 2009-05-08  6:28     ` Christoph Hellwig
  0 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2009-05-08  6:28 UTC (permalink / raw)
  To: Felix Blyakher; +Cc: kernel-testers, linux-kernel, a.beregalov, xfs

The patch looks good, but a little nitpick:

On Thu, May 07, 2009 at 08:13:22PM -0500, Felix Blyakher wrote:
>  out:
>  	kmem_free(tempifp);
>  	return error;
>  
> +out_unlock:
> +	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> +	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> +	goto out;
> +
>  out_trans_cancel:
>  	xfs_trans_cancel(tp, 0);
>  	goto out_unlock;

this would be more readable as:

 out_trans_cancel:
	xfs_trans_cancel(tp, 0);
 out_unlock:
	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
	goto out;

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] xfs: fix double unlock in xfs_swap_extents()
@ 2009-05-08  6:28     ` Christoph Hellwig
  0 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2009-05-08  6:28 UTC (permalink / raw)
  To: Felix Blyakher; +Cc: xfs, kernel-testers, linux-kernel, a.beregalov

The patch looks good, but a little nitpick:

On Thu, May 07, 2009 at 08:13:22PM -0500, Felix Blyakher wrote:
>  out:
>  	kmem_free(tempifp);
>  	return error;
>  
> +out_unlock:
> +	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> +	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> +	goto out;
> +
>  out_trans_cancel:
>  	xfs_trans_cancel(tp, 0);
>  	goto out_unlock;

this would be more readable as:

 out_trans_cancel:
	xfs_trans_cancel(tp, 0);
 out_unlock:
	xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
	xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
	goto out;

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

end of thread, other threads:[~2009-05-08  6:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-08  1:13 [PATCH] xfs: fix double unlock in xfs_swap_extents() Felix Blyakher
2009-05-08  1:13 ` Felix Blyakher
2009-05-08  1:13 ` Felix Blyakher
     [not found] ` <1241745202-7452-1-git-send-email-felixb-sJ/iWh9BUns@public.gmane.org>
2009-05-08  2:57   ` Eric Sandeen
2009-05-08  2:57     ` Eric Sandeen
2009-05-08  2:57     ` Eric Sandeen
     [not found]     ` <4A039F85.8010506-+82itfer+wXR7s880joybQ@public.gmane.org>
2009-05-08  5:20       ` Felix Blyakher
2009-05-08  5:20         ` Felix Blyakher
2009-05-08  5:20         ` Felix Blyakher
2009-05-08  6:28   ` Christoph Hellwig
2009-05-08  6:28     ` Christoph Hellwig
2009-05-08  6:28     ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.