Whamcloud - gitweb
LU-10926 llite: avoid panic in ll_set_acl()
While pushing the xattr work upstream Dan Carpenter noticed a bug
in ll_set_acl() that could panic a node. The problem is in the
case of default the code jumps to out: which calls the function
forget_cached_acl(). If you call forget_cached_acl() with a type
not related to ACLs it will crash the node via a BUG(). To avoid
this just test rc after the switch block and return since neither
the acl or xattr have been modified.
Change-Id: Ib6f3e5e818635c56cc4abbf37e7c63e6897a72a6
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/32045
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>