All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Nazarewicz <mpn@google.com>
To: Chris Mason <chris.mason@fusionio.com>,
	Filipe David Borba Manana <fdmanana@gmail.com>
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] btrfs: remove dead code
Date: Fri, 29 Nov 2013 18:01:15 +0100	[thread overview]
Message-ID: <1385744475-9614-1-git-send-email-mpn@google.com> (raw)

From: Michal Nazarewicz <mina86@mina86.com>

[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>
---
 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.1


             reply	other threads:[~2013-11-29 17:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 17:01 Michal Nazarewicz [this message]
2013-11-29 20:00 ` [PATCH] btrfs: remove dead code Filipe David Manana
  -- strict thread matches above, loose matches on Subject: below --
2022-01-28 11:50 [PATCH] btrfs: Remove " Muhammad Usama Anjum
2022-02-01 14:05 ` David Sterba
2010-01-07 15:25 [patch] btrfs: remove " Dan Carpenter
2009-08-24 18:40 [PATCH] Btrfs: " Josef Bacik
2009-03-26 13:39 btrfs: memory leak on error path error27
2009-03-26 13:54 ` unhandled kmallocs remaining Dan Carpenter
2009-03-26 14:10   ` [patch] btrfs: remove dead code Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1385744475-9614-1-git-send-email-mpn@google.com \
    --to=mpn@google.com \
    --cc=chris.mason@fusionio.com \
    --cc=fdmanana@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.