提交 11850392 编写于 作者: M Michal Nazarewicz 提交者: Chris Mason

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: NMichal Nazarewicz <mina86@mina86.com>
Reviewed-By: NFilipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: NJosef Bacik <jbacik@fb.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 878f2d2c
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册