Re: [PATCH] Replace obscure constructs in fs/block_dev.c

2007-06-17 Thread Johannes Weiner
Hi, please ignore the last revision of this patch. There were some places where semantics where changed instead of just presentation. Also the bd_claim() 'fixup' was reverted, due to a misunderstanding of the code. This patch replaces some funky codepaths in fs/block_dev.c with cleaner

Re: [PATCH] Replace obscure constructs in fs/block_dev.c

2007-06-17 Thread Johannes Weiner
Hi, On Sun, Jun 17, 2007 at 11:38:55AM +0200, Bjoern Steinbrink wrote: [SNIP] > > - /* first decide result */ > > - if (bdev->bd_holder == holder) > > - res = 0; /* already a holder */ > > - else if (bdev->bd_holder != NULL) > > - res = -EBUSY;/* held by

Re: [PATCH] Replace obscure constructs in fs/block_dev.c

2007-06-17 Thread Björn Steinbrink
On 2007.06.15 15:46:32 +0200, Johannes Weiner wrote: > Hi, > > Andrew, I promised it [1], here goes. Patched against Linus' git-tree. > > [1] http://lkml.org/lkml/2007/3/22/226 > > This patch replaces some obscure code-paths in fs/block_dev.c with more > readable versions. > > Signed-off-by:

Re: [PATCH] Replace obscure constructs in fs/block_dev.c

2007-06-17 Thread Björn Steinbrink
On 2007.06.15 15:46:32 +0200, Johannes Weiner wrote: Hi, Andrew, I promised it [1], here goes. Patched against Linus' git-tree. [1] http://lkml.org/lkml/2007/3/22/226 This patch replaces some obscure code-paths in fs/block_dev.c with more readable versions. Signed-off-by: Johannes

Re: [PATCH] Replace obscure constructs in fs/block_dev.c

2007-06-17 Thread Johannes Weiner
Hi, On Sun, Jun 17, 2007 at 11:38:55AM +0200, Bjoern Steinbrink wrote: [SNIP] - /* first decide result */ - if (bdev-bd_holder == holder) - res = 0; /* already a holder */ - else if (bdev-bd_holder != NULL) - res = -EBUSY;/* held by someone else */

Re: [PATCH] Replace obscure constructs in fs/block_dev.c

2007-06-17 Thread Johannes Weiner
Hi, please ignore the last revision of this patch. There were some places where semantics where changed instead of just presentation. Also the bd_claim() 'fixup' was reverted, due to a misunderstanding of the code. This patch replaces some funky codepaths in fs/block_dev.c with cleaner

[PATCH] Replace obscure constructs in fs/block_dev.c

2007-06-15 Thread Johannes Weiner
Hi, Andrew, I promised it [1], here goes. Patched against Linus' git-tree. [1] http://lkml.org/lkml/2007/3/22/226 This patch replaces some obscure code-paths in fs/block_dev.c with more readable versions. Signed-off-by: Johannes Weiner <[EMAIL PROTECTED]> diff --git a/fs/block_dev.c

[PATCH] Replace obscure constructs in fs/block_dev.c

2007-06-15 Thread Johannes Weiner
Hi, Andrew, I promised it [1], here goes. Patched against Linus' git-tree. [1] http://lkml.org/lkml/2007/3/22/226 This patch replaces some obscure code-paths in fs/block_dev.c with more readable versions. Signed-off-by: Johannes Weiner [EMAIL PROTECTED] diff --git a/fs/block_dev.c