summaryrefslogtreecommitdiffstats
path: root/fs/crypto/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/crypto/hooks.c')
-rw-r--r--fs/crypto/hooks.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/crypto/hooks.c b/fs/crypto/hooks.c
index 926e5df20ec3..56debb1fcf5e 100644
--- a/fs/crypto/hooks.c
+++ b/fs/crypto/hooks.c
@@ -58,7 +58,7 @@ int __fscrypt_prepare_link(struct inode *inode, struct inode *dir)
58 return err; 58 return err;
59 59
60 if (!fscrypt_has_permitted_context(dir, inode)) 60 if (!fscrypt_has_permitted_context(dir, inode))
61 return -EPERM; 61 return -EXDEV;
62 62
63 return 0; 63 return 0;
64} 64}
@@ -82,13 +82,13 @@ int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry,
82 if (IS_ENCRYPTED(new_dir) && 82 if (IS_ENCRYPTED(new_dir) &&
83 !fscrypt_has_permitted_context(new_dir, 83 !fscrypt_has_permitted_context(new_dir,
84 d_inode(old_dentry))) 84 d_inode(old_dentry)))
85 return -EPERM; 85 return -EXDEV;
86 86
87 if ((flags & RENAME_EXCHANGE) && 87 if ((flags & RENAME_EXCHANGE) &&
88 IS_ENCRYPTED(old_dir) && 88 IS_ENCRYPTED(old_dir) &&
89 !fscrypt_has_permitted_context(old_dir, 89 !fscrypt_has_permitted_context(old_dir,
90 d_inode(new_dentry))) 90 d_inode(new_dentry)))
91 return -EPERM; 91 return -EXDEV;
92 } 92 }
93 return 0; 93 return 0;
94} 94}