History

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.

Eric Biggers committed 7 years ago

Commit cd0265f1 parent dc4060a4 files · +9 −16Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/fscrypt.h+2−3
@@ -90,7 +90,7 @@ static inline bool fscrypt_dummy_context_enabled(struct inode *inode) · 89 unmodified lines
9090
9191 /* crypto.c */
9292 extern void fscrypt_enqueue_decrypt_work(struct work_struct *);
93−extern struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *, gfp_t);
93+extern struct fscrypt_ctx *fscrypt_get_ctx(gfp_t);
9494 extern void fscrypt_release_ctx(struct fscrypt_ctx *);
9595 extern struct page *fscrypt_encrypt_page(const struct inode *, struct page *,
9696 unsigned int, unsigned int,
@@ -247,8 +247,7 @@ static inline void fscrypt_enqueue_decrypt_work(struct work_struct *work) · 150 unmodified lines
247247 {
248248 }
249249
250−static inline struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *inode,
251− gfp_t gfp_flags)
250+static inline struct fscrypt_ctx *fscrypt_get_ctx(gfp_t gfp_flags)
252251 {
253252 return ERR_PTR(-EOPNOTSUPP);
254253 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t