Lines Matching refs:inode
95 int (*get_context)(struct inode *inode, void *ctx, size_t len);
113 int (*set_context)(struct inode *inode, const void *ctx, size_t len,
130 bool (*empty_dir)(struct inode *inode);
181 static inline struct fscrypt_info *fscrypt_get_info(const struct inode *inode) in fscrypt_get_info() argument
189 return smp_load_acquire(&inode->i_crypt_info); in fscrypt_get_info()
203 static inline bool fscrypt_needs_contents_encryption(const struct inode *inode) in fscrypt_needs_contents_encryption() argument
205 return IS_ENCRYPTED(inode) && S_ISREG(inode->i_mode); in fscrypt_needs_contents_encryption()
256 int fscrypt_encrypt_block_inplace(const struct inode *inode, struct page *page,
262 int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page,
283 int fscrypt_has_permitted_context(struct inode *parent, struct inode *child);
284 int fscrypt_context_for_new_inode(void *ctx, struct inode *inode);
285 int fscrypt_set_context(struct inode *inode, void *fs_data);
317 int fscrypt_prepare_new_inode(struct inode *dir, struct inode *inode,
319 void fscrypt_put_encryption_info(struct inode *inode);
320 void fscrypt_free_inode(struct inode *inode);
321 int fscrypt_drop_inode(struct inode *inode);
324 int fscrypt_fname_encrypt(const struct inode *inode, const struct qstr *iname,
326 bool fscrypt_fname_encrypted_size(const struct inode *inode, u32 orig_len,
328 int fscrypt_setup_filename(struct inode *inode, const struct qstr *iname,
339 int fscrypt_fname_disk_to_usr(const struct inode *inode,
345 u64 fscrypt_fname_siphash(const struct inode *dir, const struct qstr *name);
350 int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,
354 int fscrypt_file_open(struct inode *inode, struct file *filp);
355 int __fscrypt_prepare_link(struct inode *inode, struct inode *dir,
357 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry,
358 struct inode *new_dir, struct dentry *new_dentry,
360 int __fscrypt_prepare_lookup(struct inode *dir, struct dentry *dentry,
362 int __fscrypt_prepare_readdir(struct inode *dir);
364 int fscrypt_prepare_setflags(struct inode *inode,
366 int fscrypt_prepare_symlink(struct inode *dir, const char *target,
369 int __fscrypt_encrypt_symlink(struct inode *inode, const char *target,
371 const char *fscrypt_get_symlink(struct inode *inode, const void *caddr,
382 static inline struct fscrypt_info *fscrypt_get_info(const struct inode *inode) in fscrypt_get_info() argument
387 static inline bool fscrypt_needs_contents_encryption(const struct inode *inode) in fscrypt_needs_contents_encryption() argument
414 static inline int fscrypt_encrypt_block_inplace(const struct inode *inode, in fscrypt_encrypt_block_inplace() argument
429 static inline int fscrypt_decrypt_block_inplace(const struct inode *inode, in fscrypt_decrypt_block_inplace() argument
475 static inline int fscrypt_has_permitted_context(struct inode *parent, in fscrypt_has_permitted_context()
476 struct inode *child) in fscrypt_has_permitted_context()
481 static inline int fscrypt_set_context(struct inode *inode, void *fs_data) in fscrypt_set_context() argument
549 static inline int fscrypt_prepare_new_inode(struct inode *dir, in fscrypt_prepare_new_inode()
550 struct inode *inode, in fscrypt_prepare_new_inode() argument
558 static inline void fscrypt_put_encryption_info(struct inode *inode) in fscrypt_put_encryption_info() argument
563 static inline void fscrypt_free_inode(struct inode *inode) in fscrypt_free_inode() argument
567 static inline int fscrypt_drop_inode(struct inode *inode) in fscrypt_drop_inode() argument
573 static inline int fscrypt_setup_filename(struct inode *dir, in fscrypt_setup_filename()
603 static inline int fscrypt_fname_disk_to_usr(const struct inode *inode, in fscrypt_fname_disk_to_usr() argument
620 static inline u64 fscrypt_fname_siphash(const struct inode *dir, in fscrypt_fname_siphash()
639 static inline int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk, in fscrypt_zeroout_range() argument
647 static inline int fscrypt_file_open(struct inode *inode, struct file *filp) in fscrypt_file_open() argument
649 if (IS_ENCRYPTED(inode)) in fscrypt_file_open()
654 static inline int __fscrypt_prepare_link(struct inode *inode, struct inode *dir, in __fscrypt_prepare_link() argument
660 static inline int __fscrypt_prepare_rename(struct inode *old_dir, in __fscrypt_prepare_rename()
662 struct inode *new_dir, in __fscrypt_prepare_rename()
669 static inline int __fscrypt_prepare_lookup(struct inode *dir, in __fscrypt_prepare_lookup()
676 static inline int __fscrypt_prepare_readdir(struct inode *dir) in __fscrypt_prepare_readdir()
687 static inline int fscrypt_prepare_setflags(struct inode *inode, in fscrypt_prepare_setflags() argument
694 static inline int fscrypt_prepare_symlink(struct inode *dir, in fscrypt_prepare_symlink()
709 static inline int __fscrypt_encrypt_symlink(struct inode *inode, in __fscrypt_encrypt_symlink() argument
717 static inline const char *fscrypt_get_symlink(struct inode *inode, in fscrypt_get_symlink() argument
741 bool __fscrypt_inode_uses_inline_crypto(const struct inode *inode);
744 const struct inode *inode, u64 first_lblk,
751 bool fscrypt_mergeable_bio(struct bio *bio, const struct inode *inode,
757 bool fscrypt_dio_supported(struct inode *inode);
759 u64 fscrypt_limit_io_blocks(const struct inode *inode, u64 lblk, u64 nr_blocks);
763 static inline bool __fscrypt_inode_uses_inline_crypto(const struct inode *inode) in __fscrypt_inode_uses_inline_crypto() argument
769 const struct inode *inode, in fscrypt_set_bio_crypt_ctx() argument
778 const struct inode *inode, in fscrypt_mergeable_bio() argument
790 static inline bool fscrypt_dio_supported(struct inode *inode) in fscrypt_dio_supported() argument
792 return !fscrypt_needs_contents_encryption(inode); in fscrypt_dio_supported()
795 static inline u64 fscrypt_limit_io_blocks(const struct inode *inode, u64 lblk, in fscrypt_limit_io_blocks() argument
811 static inline bool fscrypt_inode_uses_inline_crypto(const struct inode *inode) in fscrypt_inode_uses_inline_crypto() argument
813 return fscrypt_needs_contents_encryption(inode) && in fscrypt_inode_uses_inline_crypto()
814 __fscrypt_inode_uses_inline_crypto(inode); in fscrypt_inode_uses_inline_crypto()
826 static inline bool fscrypt_inode_uses_fs_layer_crypto(const struct inode *inode) in fscrypt_inode_uses_fs_layer_crypto() argument
828 return fscrypt_needs_contents_encryption(inode) && in fscrypt_inode_uses_fs_layer_crypto()
829 !__fscrypt_inode_uses_inline_crypto(inode); in fscrypt_inode_uses_fs_layer_crypto()
841 static inline bool fscrypt_has_encryption_key(const struct inode *inode) in fscrypt_has_encryption_key() argument
843 return fscrypt_get_info(inode) != NULL; in fscrypt_has_encryption_key()
865 struct inode *dir, in fscrypt_prepare_link()
895 static inline int fscrypt_prepare_rename(struct inode *old_dir, in fscrypt_prepare_rename()
897 struct inode *new_dir, in fscrypt_prepare_rename()
930 static inline int fscrypt_prepare_lookup(struct inode *dir, in fscrypt_prepare_lookup()
957 static inline int fscrypt_prepare_readdir(struct inode *dir) in fscrypt_prepare_readdir()
1005 static inline int fscrypt_encrypt_symlink(struct inode *inode, in fscrypt_encrypt_symlink() argument
1010 if (IS_ENCRYPTED(inode)) in fscrypt_encrypt_symlink()
1011 return __fscrypt_encrypt_symlink(inode, target, len, disk_link); in fscrypt_encrypt_symlink()