Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11850392 authored by Michal Nazarewicz's avatar Michal Nazarewicz Committed by Chris Mason
Browse files

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: default avatarMichal Nazarewicz <mina86@mina86.com>
Reviewed-By: default avatarFilipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 878f2d2c
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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);
	}