Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32190f0a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull fscrypt updates from Ted Ts'o:
 "Lots of cleanups, mostly courtesy by Eric Biggers"

* tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt:
  fscrypt: lock mutex before checking for bounce page pool
  fscrypt: add a documentation file for filesystem-level encryption
  ext4: switch to fscrypt_prepare_setattr()
  ext4: switch to fscrypt_prepare_lookup()
  ext4: switch to fscrypt_prepare_rename()
  ext4: switch to fscrypt_prepare_link()
  ext4: switch to fscrypt_file_open()
  fscrypt: new helper function - fscrypt_prepare_setattr()
  fscrypt: new helper function - fscrypt_prepare_lookup()
  fscrypt: new helper function - fscrypt_prepare_rename()
  fscrypt: new helper function - fscrypt_prepare_link()
  fscrypt: new helper function - fscrypt_file_open()
  fscrypt: new helper function - fscrypt_require_key()
  fscrypt: remove unneeded empty fscrypt_operations structs
  fscrypt: remove ->is_encrypted()
  fscrypt: switch from ->is_encrypted() to IS_ENCRYPTED()
  fs, fscrypt: add an S_ENCRYPTED inode flag
  fscrypt: clean up include file mess
parents 37dc7956 a0b3bc85
Loading
Loading
Loading
Loading
+610 −0

File added.

Preview size limit exceeded, changes collapsed.

+11 −0
Original line number Diff line number Diff line
@@ -315,3 +315,14 @@ exported for use by modules.
   :internal:

.. kernel-doc:: fs/pipe.c

Encryption API
==============

A library which filesystems can hook into to support transparent
encryption of files and directories.

.. toctree::
    :maxdepth: 2

    fscrypt
+1 −0
Original line number Diff line number Diff line
@@ -5664,6 +5664,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt.git
S:	Supported
F:	fs/crypto/
F:	include/linux/fscrypt*.h
F:	Documentation/filesystems/fscrypt.rst

FUJITSU FR-V (FRV) PORT
S:	Orphan
+1 −1
Original line number Diff line number Diff line
obj-$(CONFIG_FS_ENCRYPTION)	+= fscrypto.o

fscrypto-y := crypto.o fname.o policy.o keyinfo.o
fscrypto-y := crypto.o fname.o hooks.o keyinfo.o policy.o
fscrypto-$(CONFIG_BLOCK) += bio.o
+3 −6
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ static int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags)
		return -ECHILD;

	dir = dget_parent(dentry);
	if (!d_inode(dir)->i_sb->s_cop->is_encrypted(d_inode(dir))) {
	if (!IS_ENCRYPTED(d_inode(dir))) {
		dput(dir);
		return 0;
	}
@@ -390,11 +390,8 @@ int fscrypt_initialize(unsigned int cop_flags)
{
	int i, res = -ENOMEM;

	/*
	 * No need to allocate a bounce page pool if there already is one or
	 * this FS won't use it.
	 */
	if (cop_flags & FS_CFLG_OWN_PAGES || fscrypt_bounce_page_pool)
	/* No need to allocate a bounce page pool if this FS won't use it. */
	if (cop_flags & FS_CFLG_OWN_PAGES)
		return 0;

	mutex_lock(&fscrypt_init_mutex);
Loading