mirror of
https://github.com/torvalds/linux.git
synced 2026-11-30 02:23:05 +00:00
As reported by Eric Paris, the capable() check in ext4_has_free_blocks() sometimes causes SELinux denials. We can rearrange the logic so that we only try to use the root-reserved blocks when necessary, and even then we can move the capable() test to last, to avoid the check most of the time. Signed-off-by: Eric Sandeen <[email protected]> Reviewed-by: Mingming Cao <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>