Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / fs / f2fs / crypto_policy.c
index d4a96af..e504f54 100644 (file)
@@ -89,6 +89,9 @@ static int f2fs_create_encryption_context_from_policy(
 int f2fs_process_policy(const struct f2fs_encryption_policy *policy,
                        struct inode *inode)
 {
+       if (!inode_owner_or_capable(inode))
+               return -EACCES;
+
        if (policy->version != 0)
                return -EINVAL;