summaryrefslogtreecommitdiffstats
path: root/include/linux/fscrypt.h
diff options
context:
space:
mode:
authorEric Biggers2019-03-18 18:23:33 +0100
committerTheodore Ts'o2019-04-17 00:37:25 +0200
commitcd0265fcd2eae9004c68ef2123a9dac0dc5a666a (patch)
tree3d0ecb2c81a38689f21b9f056938cbdaaf6156ed /include/linux/fscrypt.h
parentLinux 5.1-rc5 (diff)
downloadkernel-qcow2-linux-cd0265fcd2eae9004c68ef2123a9dac0dc5a666a.tar.gz
kernel-qcow2-linux-cd0265fcd2eae9004c68ef2123a9dac0dc5a666a.tar.xz
kernel-qcow2-linux-cd0265fcd2eae9004c68ef2123a9dac0dc5a666a.zip
fscrypt: drop inode argument from fscrypt_get_ctx()
The only reason the inode is being passed to fscrypt_get_ctx() is to verify that the encryption key is available. However, all callers already ensure this because if we get as far as trying to do I/O to an encrypted file without the key, there's already a bug. Therefore, remove this unnecessary argument. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/linux/fscrypt.h')
-rw-r--r--include/linux/fscrypt.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
index e5194fc3983e..6cf8a34523ff 100644
--- a/include/linux/fscrypt.h
+++ b/include/linux/fscrypt.h
@@ -90,7 +90,7 @@ static inline bool fscrypt_dummy_context_enabled(struct inode *inode)
/* crypto.c */
extern void fscrypt_enqueue_decrypt_work(struct work_struct *);
-extern struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *, gfp_t);
+extern struct fscrypt_ctx *fscrypt_get_ctx(gfp_t);
extern void fscrypt_release_ctx(struct fscrypt_ctx *);
extern struct page *fscrypt_encrypt_page(const struct inode *, struct page *,
unsigned int, unsigned int,
@@ -247,8 +247,7 @@ static inline void fscrypt_enqueue_decrypt_work(struct work_struct *work)
{
}
-static inline struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *inode,
- gfp_t gfp_flags)
+static inline struct fscrypt_ctx *fscrypt_get_ctx(gfp_t gfp_flags)
{
return ERR_PTR(-EOPNOTSUPP);
}