]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: clean up dead code in ocfs2_acl_from_xattr()
authorJoseph Qi <joseph.qi@huawei.com>
Wed, 11 Sep 2013 21:19:51 +0000 (14:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Sep 2013 22:56:39 +0000 (15:56 -0700)
commit9588d408e9f7de8d33759769c291aa90e00f463c
tree28907cc30d1d8502c0af318aba031fce1a7cc9aa
parent44ab5b04dc1132a04a77de50e21fe5bee4304fb6
ocfs2: clean up dead code in ocfs2_acl_from_xattr()

In ocfs2_acl_from_xattr(), if size is less than sizeof(struct
posix_acl_entry), it returns ERR_PTR(-EINVAL) directly.  Then assign (size
/ sizeof(struct posix_acl_entry)) to count which will be at least 1, that
means the following branch (count < 0) and (count == 0) will never be
true.

Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/acl.c