delay capable() check in ext4_has_free_blocks()
authorEric Sandeen <sandeen@redhat.com>
Tue, 28 Oct 2008 04:08:17 +0000 (00:08 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 28 Oct 2008 04:08:17 +0000 (00:08 -0400)
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 <sandeen@redhat.com>
Reviewed-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

No differences found