From: Eric Biggers <ebiggers@kernel.org>
To: linux-fscrypt@vger.kernel.org
Cc: linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH] fscrypt: don't check for ENOKEY from fscrypt_get_encryption_info()
Date: Fri, 3 Jan 2020 09:01:14 -0800 [thread overview]
Message-ID: <20200103170113.GJ19521@gmail.com> (raw)
In-Reply-To: <20191209212348.243331-1-ebiggers@kernel.org>
On Mon, Dec 09, 2019 at 01:23:48PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> fscrypt_get_encryption_info() returns 0 if the encryption key is
> unavailable; it never returns ENOKEY. So remove checks for ENOKEY.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
> fs/ext4/dir.c | 2 +-
> fs/f2fs/dir.c | 2 +-
> fs/ubifs/dir.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
> index 9fdd2b269d617..4c9d3ff394a5d 100644
> --- a/fs/ext4/dir.c
> +++ b/fs/ext4/dir.c
> @@ -116,7 +116,7 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)
>
> if (IS_ENCRYPTED(inode)) {
> err = fscrypt_get_encryption_info(inode);
> - if (err && err != -ENOKEY)
> + if (err)
> return err;
> }
>
> diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
> index c967cacf979ef..d9ad842945df5 100644
> --- a/fs/f2fs/dir.c
> +++ b/fs/f2fs/dir.c
> @@ -987,7 +987,7 @@ static int f2fs_readdir(struct file *file, struct dir_context *ctx)
>
> if (IS_ENCRYPTED(inode)) {
> err = fscrypt_get_encryption_info(inode);
> - if (err && err != -ENOKEY)
> + if (err)
> goto out;
>
> err = fscrypt_fname_alloc_buffer(inode, F2FS_NAME_LEN, &fstr);
> diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
> index 0b98e3c8b461d..acc4f942d25b6 100644
> --- a/fs/ubifs/dir.c
> +++ b/fs/ubifs/dir.c
> @@ -512,7 +512,7 @@ static int ubifs_readdir(struct file *file, struct dir_context *ctx)
>
> if (encrypted) {
> err = fscrypt_get_encryption_info(dir);
> - if (err && err != -ENOKEY)
> + if (err)
> return err;
>
> err = fscrypt_fname_alloc_buffer(dir, UBIFS_MAX_NLEN, &fstr);
> --
> 2.24.0.393.g34dc348eaf-goog
>
Applied to fscrypt.git#master for 5.6.
- Eric
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: linux-fscrypt@vger.kernel.org
Cc: linux-ext4@vger.kernel.org, linux-mtd@lists.infradead.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] fscrypt: don't check for ENOKEY from fscrypt_get_encryption_info()
Date: Fri, 3 Jan 2020 09:01:14 -0800 [thread overview]
Message-ID: <20200103170113.GJ19521@gmail.com> (raw)
In-Reply-To: <20191209212348.243331-1-ebiggers@kernel.org>
On Mon, Dec 09, 2019 at 01:23:48PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> fscrypt_get_encryption_info() returns 0 if the encryption key is
> unavailable; it never returns ENOKEY. So remove checks for ENOKEY.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
> fs/ext4/dir.c | 2 +-
> fs/f2fs/dir.c | 2 +-
> fs/ubifs/dir.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
> index 9fdd2b269d617..4c9d3ff394a5d 100644
> --- a/fs/ext4/dir.c
> +++ b/fs/ext4/dir.c
> @@ -116,7 +116,7 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)
>
> if (IS_ENCRYPTED(inode)) {
> err = fscrypt_get_encryption_info(inode);
> - if (err && err != -ENOKEY)
> + if (err)
> return err;
> }
>
> diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
> index c967cacf979ef..d9ad842945df5 100644
> --- a/fs/f2fs/dir.c
> +++ b/fs/f2fs/dir.c
> @@ -987,7 +987,7 @@ static int f2fs_readdir(struct file *file, struct dir_context *ctx)
>
> if (IS_ENCRYPTED(inode)) {
> err = fscrypt_get_encryption_info(inode);
> - if (err && err != -ENOKEY)
> + if (err)
> goto out;
>
> err = fscrypt_fname_alloc_buffer(inode, F2FS_NAME_LEN, &fstr);
> diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
> index 0b98e3c8b461d..acc4f942d25b6 100644
> --- a/fs/ubifs/dir.c
> +++ b/fs/ubifs/dir.c
> @@ -512,7 +512,7 @@ static int ubifs_readdir(struct file *file, struct dir_context *ctx)
>
> if (encrypted) {
> err = fscrypt_get_encryption_info(dir);
> - if (err && err != -ENOKEY)
> + if (err)
> return err;
>
> err = fscrypt_fname_alloc_buffer(dir, UBIFS_MAX_NLEN, &fstr);
> --
> 2.24.0.393.g34dc348eaf-goog
>
Applied to fscrypt.git#master for 5.6.
- Eric
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: linux-fscrypt@vger.kernel.org
Cc: linux-ext4@vger.kernel.org, linux-mtd@lists.infradead.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] fscrypt: don't check for ENOKEY from fscrypt_get_encryption_info()
Date: Fri, 3 Jan 2020 09:01:14 -0800 [thread overview]
Message-ID: <20200103170113.GJ19521@gmail.com> (raw)
In-Reply-To: <20191209212348.243331-1-ebiggers@kernel.org>
On Mon, Dec 09, 2019 at 01:23:48PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> fscrypt_get_encryption_info() returns 0 if the encryption key is
> unavailable; it never returns ENOKEY. So remove checks for ENOKEY.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
> fs/ext4/dir.c | 2 +-
> fs/f2fs/dir.c | 2 +-
> fs/ubifs/dir.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
> index 9fdd2b269d617..4c9d3ff394a5d 100644
> --- a/fs/ext4/dir.c
> +++ b/fs/ext4/dir.c
> @@ -116,7 +116,7 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)
>
> if (IS_ENCRYPTED(inode)) {
> err = fscrypt_get_encryption_info(inode);
> - if (err && err != -ENOKEY)
> + if (err)
> return err;
> }
>
> diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
> index c967cacf979ef..d9ad842945df5 100644
> --- a/fs/f2fs/dir.c
> +++ b/fs/f2fs/dir.c
> @@ -987,7 +987,7 @@ static int f2fs_readdir(struct file *file, struct dir_context *ctx)
>
> if (IS_ENCRYPTED(inode)) {
> err = fscrypt_get_encryption_info(inode);
> - if (err && err != -ENOKEY)
> + if (err)
> goto out;
>
> err = fscrypt_fname_alloc_buffer(inode, F2FS_NAME_LEN, &fstr);
> diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
> index 0b98e3c8b461d..acc4f942d25b6 100644
> --- a/fs/ubifs/dir.c
> +++ b/fs/ubifs/dir.c
> @@ -512,7 +512,7 @@ static int ubifs_readdir(struct file *file, struct dir_context *ctx)
>
> if (encrypted) {
> err = fscrypt_get_encryption_info(dir);
> - if (err && err != -ENOKEY)
> + if (err)
> return err;
>
> err = fscrypt_fname_alloc_buffer(dir, UBIFS_MAX_NLEN, &fstr);
> --
> 2.24.0.393.g34dc348eaf-goog
>
Applied to fscrypt.git#master for 5.6.
- Eric
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-01-03 17:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-09 21:23 [PATCH] fscrypt: don't check for ENOKEY from fscrypt_get_encryption_info() Eric Biggers
2019-12-09 21:23 ` Eric Biggers
2019-12-09 21:23 ` [f2fs-dev] " Eric Biggers
2020-01-03 17:01 ` Eric Biggers [this message]
2020-01-03 17:01 ` Eric Biggers
2020-01-03 17:01 ` [f2fs-dev] " Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200103170113.GJ19521@gmail.com \
--to=ebiggers@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.