summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Nazarewicz <mina86@mina86.com>2013-11-29 21:01:15 +0400
committerChris Mason <clm@fb.com>2014-01-29 01:19:50 +0400
commit11850392ee1c600c7d40d93119daa72715bc959c (patch)
treef5223d33caf5b8a10473b36795901c884eed3bbb
parent878f2d2cb355da2dabbffb2ae51b7541a91ce4e3 (diff)
downloadlinux-11850392ee1c600c7d40d93119daa72715bc959c.tar.xz
btrfs: remove dead code
[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> Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
-rw-r--r--fs/btrfs/acl.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index 0890c83643e9..460f36bae672 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);
}