All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] btrfs: remove dead code
@ 2014-01-01  5:19 Michal Nazarewicz
  2014-01-01 15:01 ` Filipe David Manana
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Nazarewicz @ 2014-01-01  5:19 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik; +Cc: linux-btrfs, linux-kernel, Michal Nazarewicz

[commit 8185554d: fix incorrect inode acl reset] introduced a dead
code by adding a condition which can never be true to an else
branch.  The condition can never be true because it is already
checked by a previous if statement which causes function to return.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Reviewed-By: Filipe David Borba Manana <fdmanana@gmail.com>
---
 fs/btrfs/acl.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index 0890c83..460f36b 100644
--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -225,13 +225,8 @@ int btrfs_init_acl(struct btrfs_trans_handle *trans,
 		ret = posix_acl_create(&acl, GFP_NOFS, &inode->i_mode);
 		if (ret < 0)
 			return ret;
-
-		if (ret > 0) {
-			/* we need an acl */
+		if (ret > 0) /* we need an acl */
 			ret = btrfs_set_acl(trans, inode, acl, ACL_TYPE_ACCESS);
-		} else if (ret < 0) {
-			cache_no_acl(inode);
-		}
 	} else {
 		cache_no_acl(inode);
 	}
-- 
1.8.4


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

* Re: [PATCH RESEND] btrfs: remove dead code
  2014-01-01  5:19 [PATCH RESEND] btrfs: remove dead code Michal Nazarewicz
@ 2014-01-01 15:01 ` Filipe David Manana
  2014-01-01 16:22   ` Michal Nazarewicz
  0 siblings, 1 reply; 4+ messages in thread
From: Filipe David Manana @ 2014-01-01 15:01 UTC (permalink / raw)
  To: Michal Nazarewicz
  Cc: Chris Mason, Josef Bacik, linux-btrfs@vger.kernel.org,
	linux-kernel

On Wed, Jan 1, 2014 at 5:19 AM, Michal Nazarewicz <mina86@mina86.com> wrote:
> [commit 8185554d: fix incorrect inode acl reset] introduced a dead
> code by adding a condition which can never be true to an else
> branch.  The condition can never be true because it is already
> checked by a previous if statement which causes function to return.
>
> Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
> Reviewed-By: Filipe David Borba Manana <fdmanana@gmail.com>
> ---
>  fs/btrfs/acl.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
> index 0890c83..460f36b 100644
> --- a/fs/btrfs/acl.c
> +++ b/fs/btrfs/acl.c
> @@ -225,13 +225,8 @@ int btrfs_init_acl(struct btrfs_trans_handle *trans,
>                 ret = posix_acl_create(&acl, GFP_NOFS, &inode->i_mode);
>                 if (ret < 0)
>                         return ret;
> -
> -               if (ret > 0) {
> -                       /* we need an acl */
> +               if (ret > 0) /* we need an acl */
>                         ret = btrfs_set_acl(trans, inode, acl, ACL_TYPE_ACCESS);
> -               } else if (ret < 0) {
> -                       cache_no_acl(inode);
> -               }
>         } else {
>                 cache_no_acl(inode);
>         }
> --
> 1.8.4

Hi Michal,

Josef already added this patch to btrfs-next weeks ago:

http://git.kernel.org/cgit/linux/kernel/git/josef/btrfs-next.git/commit/?id=c4a886e433dce2b902324a54ef2d13691a760312

regards,

>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

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

* Re: [PATCH RESEND] btrfs: remove dead code
  2014-01-01 15:01 ` Filipe David Manana
@ 2014-01-01 16:22   ` Michal Nazarewicz
  2014-01-02 15:24     ` David Sterba
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Nazarewicz @ 2014-01-01 16:22 UTC (permalink / raw)
  To: fdmanana
  Cc: Chris Mason, Josef Bacik, linux-btrfs@vger.kernel.org,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 998 bytes --]

> On Wed, Jan 1, 2014 at 5:19 AM, Michal Nazarewicz <mina86@mina86.com> wrote:
>> [commit 8185554d: fix incorrect inode acl reset] introduced a dead
>> code by adding a condition which can never be true to an else
>> branch.  The condition can never be true because it is already
>> checked by a previous if statement which causes function to return.

On Wed, Jan 01 2014, Filipe David Manana wrote:
> Josef already added this patch to btrfs-next weeks ago:
>
> http://git.kernel.org/cgit/linux/kernel/git/josef/btrfs-next.git/commit/?id=c4a886e433dce2b902324a54ef2d13691a760312

Ah, sorry for the spam then.

The original thread did not mention it and this commit was not included
in linux-next's master branch.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: [PATCH RESEND] btrfs: remove dead code
  2014-01-01 16:22   ` Michal Nazarewicz
@ 2014-01-02 15:24     ` David Sterba
  0 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2014-01-02 15:24 UTC (permalink / raw)
  To: Michal Nazarewicz
  Cc: fdmanana, Chris Mason, Josef Bacik, linux-btrfs@vger.kernel.org,
	linux-kernel

On Wed, Jan 01, 2014 at 05:22:18PM +0100, Michal Nazarewicz wrote:
> > On Wed, Jan 1, 2014 at 5:19 AM, Michal Nazarewicz <mina86@mina86.com> wrote:
> >> [commit 8185554d: fix incorrect inode acl reset] introduced a dead
> >> code by adding a condition which can never be true to an else
> >> branch.  The condition can never be true because it is already
> >> checked by a previous if statement which causes function to return.
> 
> On Wed, Jan 01 2014, Filipe David Manana wrote:
> > Josef already added this patch to btrfs-next weeks ago:
> >
> > http://git.kernel.org/cgit/linux/kernel/git/josef/btrfs-next.git/commit/?id=c4a886e433dce2b902324a54ef2d13691a760312
> 
> Ah, sorry for the spam then.
> 
> The original thread did not mention it and this commit was not included
> in linux-next's master branch.

FYI, the patches get merged to btrfs-next without confirmations to the
mailiglist, the linux-next tree does not merge the development branches,
only when Chris publishes a branch named 'next'.
(http://linux.f-seidel.de/linux-next/pmwiki/pmwiki.php?n=Linux-next.IncludedTrees)

david

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

end of thread, other threads:[~2014-01-02 15:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-01  5:19 [PATCH RESEND] btrfs: remove dead code Michal Nazarewicz
2014-01-01 15:01 ` Filipe David Manana
2014-01-01 16:22   ` Michal Nazarewicz
2014-01-02 15:24     ` David Sterba

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.