]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/f2fs/namei.c
fscrypt: use ENOKEY when file cannot be created w/o key
[karo-tx-linux.git] / fs / f2fs / namei.c
index 56c19b0610a899a6351f72a16e26b788f956e3d5..11cabcadb1a33c5e868ca2115453a108184c215c 100644 (file)
@@ -403,7 +403,7 @@ static int f2fs_symlink(struct inode *dir, struct dentry *dentry,
                        return err;
 
                if (!fscrypt_has_encryption_key(dir))
-                       return -EPERM;
+                       return -ENOKEY;
 
                disk_link.len = (fscrypt_fname_encrypted_size(dir, len) +
                                sizeof(struct fscrypt_symlink_data));
@@ -447,7 +447,7 @@ static int f2fs_symlink(struct inode *dir, struct dentry *dentry,
                        goto err_out;
 
                if (!fscrypt_has_encryption_key(inode)) {
-                       err = -EPERM;
+                       err = -ENOKEY;
                        goto err_out;
                }